<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>报表填报及分析系统 - 原型图</title>
    <!-- Element UI -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" />
    <!-- Custom Styles -->
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
          sans-serif;
        background-color: #f0f2f5;
        color: #333;
        margin: 0;
        padding: 0;
        height: 100vh;
        overflow: hidden;
      }

      input[type='number']::-webkit-inner-spin-button,
      input[type='number']::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }

      /* 多级表头表格样式 - 使用Element UI默认样式 */

      #app {
        height: 100vh;
      }

      /* 版本卡片样式 */
      .version-card {
        transition: all 0.3s ease;
        border: 1px solid #e4e7ed;
        border-radius: 4px;
        padding: 12px;
        margin-bottom: 12px;
        margin-top: 4px;
        cursor: pointer;
        background-color: #fff;
      }

      .version-card:hover {
        border-color: #409eff;
        box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
        transform: translateY(-1px);
      }

      .version-card.active {
        border-color: #409eff;
        background-color: #f0f9ff;
        box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
      }

      .version-card.active .version-name {
        color: #409eff;
        font-weight: bold;
      }

      .el-container {
        height: 100vh;
      }

      /* 主内容区域 */
      .main-container {
        width: 100%;
        margin: 0;
        padding: 0 5px;
      }

      /* 清除浮动 */
      .clearfix:before,
      .clearfix:after {
        display: table;
        content: '';
      }
      .clearfix:after {
        clear: both;
      }

      /* 搜索栏 */
      .search-bar {
        background: #f8f9fa;
        padding: 20px;
        border-radius: 4px;
        margin-bottom: 20px;
      }

      /* 操作栏 */
      .toolbar {
        margin-bottom: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      /* 表格 */
      .el-table {
        border: 1px solid #ebeef5;
      }

      /* 状态标签 */
      .status-tag {
        font-size: 12px;
      }

      /* 白色内容区域最小高度设置 */
      .main-container {
        min-height: calc(100vh - 80px); /* 减去头部导航栏的高度 */
      }

      /* 为每个白色卡片设置最小高度 */
      .box-card {
        min-height: calc(100vh - 100px); /* 减去头部导航栏和边距的高度 */
        display: flex;
        flex-direction: column;
      }

      /* 确保卡片内容填充整个高度 */
      .box-card .el-card__body {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 160px); /* 减去头部、卡片头部和边距的高度 */
      }

      /* 统计卡片特殊处理 - 不应用页面高度样式 */
      .el-row .box-card {
        min-height: auto !important;
        display: block !important;
      }

      .el-row .box-card .el-card__body {
        min-height: auto !important;
        display: block !important;
        flex: none !important;
      }

      /* 为独立页面容器设置最小高度 */
      .page-content {
        min-height: calc(100vh - 100px);
        display: flex;
        flex-direction: column;
      }

      .page-content .el-card {
        min-height: calc(100vh - 120px);
        display: flex;
        flex-direction: column;
      }

      .page-content .el-card .el-card__body {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 180px);
      }

      /* 为填报情况统计页面优化布局 */
      #report-collection-detail .el-card__body {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 20px;
      }

      #report-collection-detail .el-form {
        flex-shrink: 0;
        margin-bottom: 20px;
      }

      #report-collection-detail .el-row {
        flex-shrink: 0;
        margin-bottom: 20px;
      }

      #report-collection-detail .el-table {
        flex: 1;
        margin-bottom: 20px;
        min-height: 400px;
      }

      #report-collection-detail .el-pagination {
        flex-shrink: 0;
        margin-top: auto;
      }

      /* 为其他页面优化表格布局 */
      .page-content .el-card__body {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 20px;
      }

      .page-content .el-table {
        flex: 1;
        margin-bottom: 20px;
        min-height: 400px;
      }

      .page-content .el-pagination {
        flex-shrink: 0;
        margin-top: auto;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <el-container>
        <!-- 顶部导航栏 -->
        <el-header style="background-color: #304156; color: white; padding: 0; height: 60px">
          <div
            style="
              display: flex;
              align-items: center;
              justify-content: space-between;
              height: 100%;
              padding: 0 20px;
            "
          >
            <div style="display: flex; align-items: center">
              <i class="el-icon-s-platform" style="font-size: 24px; margin-right: 10px"></i>
              <h2 style="margin: 0; font-size: 20px; font-weight: 500">
                手工报表线上填报及分析校验平台
              </h2>
            </div>
            <div style="display: flex; align-items: center">
              <el-dropdown @command="handleCommand">
                <span style="color: white; cursor: pointer">
                  <i class="el-icon-user" style="margin-right: 5px"></i>
                  管理员
                  <i class="el-icon-arrow-down el-icon--right"></i>
                </span>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item command="profile">个人中心</el-dropdown-item>
                  <el-dropdown-item command="settings">系统设置</el-dropdown-item>
                  <el-dropdown-item command="logout" divided>退出登录</el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
            </div>
          </div>
        </el-header>

        <el-container>
          <!-- 左侧菜单栏 -->
          <el-aside width="200px" style="background-color: #304156">
            <el-menu
              default-active="data-dict"
              class="el-menu-vertical"
              background-color="#304156"
              text-color="#bfcbd9"
              active-text-color="#409EFF"
              @select="handleMenuSelect"
            >
              <el-menu-item-group title="报表收集">
                <el-menu-item index="data-dict">
                  <i class="el-icon-s-grid"></i>
                  <span slot="title">数据字典管理</span>
                </el-menu-item>
                <el-menu-item index="validation-rules">
                  <i class="el-icon-s-check"></i>
                  <span slot="title">数据校验规则管理</span>
                </el-menu-item>
                <el-submenu index="filling-management">
                  <template slot="title">
                    <i class="el-icon-document"></i>
                    <span>填报管理</span>
                  </template>
                  <el-menu-item index="template-management">
                    <i class="el-icon-files"></i>
                    <span slot="title">模板管理</span>
                  </el-menu-item>
                  <el-menu-item index="case-prevention-management">
                    <i class="el-icon-s-data"></i>
                    <span slot="title">案防统计管理</span>
                  </el-menu-item>
                </el-submenu>
                <el-menu-item index="data-filling">
                  <i class="el-icon-edit"></i>
                  <span slot="title">数据填报</span>
                </el-menu-item>
                <el-menu-item index="filling-detail">
                  <i class="el-icon-document"></i>
                  <span slot="title">直接填报(案防)</span>
                </el-menu-item>
                <el-menu-item index="direct-filling-1d">
                  <i class="el-icon-s-grid"></i>
                  <span slot="title">直接填报</span>
                </el-menu-item>
              </el-menu-item-group>
              <el-menu-item-group title="目标管理">
                <el-menu-item index="target-management">
                  <i class="el-icon-s-marketing"></i>
                  <span slot="title">目标管理</span>
                </el-menu-item>
                <el-menu-item index="target-filling">
                  <i class="el-icon-s-flag"></i>
                  <span slot="title">目标值分配</span>
                </el-menu-item>
              </el-menu-item-group>
              <el-menu-item-group title="统计">
                <el-menu-item index="report-collection-detail">
                  <i class="el-icon-data-analysis"></i>
                  <span slot="title">填报情况统计</span>
                </el-menu-item>
                <el-menu-item index="filling-detail-list">
                  <i class="el-icon-files"></i>
                  <span slot="title">填报明细</span>
                </el-menu-item>
              </el-menu-item-group>
              <el-menu-item-group title="系统">
                <el-menu-item index="audit-log">
                  <i class="el-icon-s-data"></i>
                  <span slot="title">审计日志</span>
                </el-menu-item>
              </el-menu-item-group>
            </el-menu>
          </el-aside>

          <!-- 主内容区域 -->
          <el-main
            style="
              background-color: #f0f2f5;
              padding: 10px;
              overflow-y: auto;
              height: calc(100vh - 60px);
            "
          >
            <div class="main-container">
              <!-- 数据字典管理页面 -->
              <el-card id="data-dict" class="box-card" style="margin-bottom: 10px; width: 100%">
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: 600">数据字典管理</span>
                  <div style="float: right">
                    <el-button type="primary" icon="el-icon-plus" @click="handleAdd">
                      新增字典
                    </el-button>
                    <el-button type="success" icon="el-icon-upload2">批量导入</el-button>
                    <el-button type="warning" icon="el-icon-download">导出</el-button>
                  </div>
                </div>
                <!-- 搜索栏 -->
                <el-form
                  :inline="true"
                  :model="searchForm"
                  class="demo-form-inline"
                  style="margin-bottom: 20px"
                >
                  <el-form-item label="字典类型编码">
                    <el-input
                      v-model="searchForm.dictTypeCode"
                      placeholder="请输入字典类型编码"
                      clearable
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="字典类型名称">
                    <el-input
                      v-model="searchForm.dictTypeName"
                      placeholder="请输入字典类型名称"
                      clearable
                    ></el-input>
                  </el-form-item>
                  <el-form-item>
                    <el-button type="primary" @click="handleSearch" :loading="loading">
                      查询
                    </el-button>
                    <el-button @click="handleReset">重置</el-button>
                  </el-form-item>
                </el-form>

                <!-- 操作栏 -->
                <div style="margin-bottom: 20px">
                  <el-button
                    type="success"
                    @click="batchEnable"
                    :disabled="selectedDicts.length === 0"
                  >
                    批量启用
                  </el-button>
                  <el-button
                    type="warning"
                    @click="batchDisable"
                    :disabled="selectedDicts.length === 0"
                  >
                    批量停用
                  </el-button>
                </div>

                <!-- 数据表格 -->
                <el-table
                  :data="dictList"
                  v-loading="loading"
                  @selection-change="handleSelectionChange"
                  border
                  stripe
                  style="width: 100%"
                >
                  <el-table-column type="selection" width="55"></el-table-column>
                  <el-table-column
                    prop="dictTypeCode"
                    label="字典类型编码"
                    width="150"
                  ></el-table-column>
                  <el-table-column
                    prop="dictTypeName"
                    label="字典类型名称"
                    width="150"
                  ></el-table-column>
                  <el-table-column
                    prop="dictItemCode"
                    label="字典项编码"
                    width="120"
                  ></el-table-column>
                  <el-table-column
                    prop="dictItemName"
                    label="字典项名称"
                    width="150"
                  ></el-table-column>
                  <el-table-column prop="sortOrder" label="序号" width="80"></el-table-column>
                  <el-table-column prop="status" label="状态" width="100">
                    <template slot-scope="scope">
                      <el-tag
                        :type="scope.row.status === '启用' ? 'success' : 'danger'"
                        size="small"
                        class="status-tag"
                      >
                        {{ scope.row.status }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="maintainerName"
                    label="维护人姓名"
                    width="120"
                  ></el-table-column>
                  <el-table-column
                    prop="maintainerId"
                    label="维护人工号"
                    width="120"
                  ></el-table-column>
                  <el-table-column
                    prop="maintainTime"
                    label="维护时间"
                    width="180"
                  ></el-table-column>
                  <el-table-column label="操作" width="200" fixed="right">
                    <template slot-scope="scope">
                      <el-button type="text" size="small" @click="handleEdit(scope.row)">
                        编辑
                      </el-button>
                      <el-button
                        type="text"
                        size="small"
                        @click="handleDelete(scope.row)"
                        style="color: #f56c6c"
                      >
                        删除
                      </el-button>
                    </template>
                  </el-table-column>
                </el-table>

                <!-- 分页 -->
                <div style="margin-top: 20px; text-align: right">
                  <el-pagination
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="pageNum"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="pageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="total"
                  ></el-pagination>
                </div>
              </el-card>

              <!-- 数据校验规则管理页面 -->
              <el-card
                id="validation-rules"
                class="box-card"
                style="margin-bottom: 10px; width: 100%"
              >
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: 600">数据校验规则管理</span>
                  <div style="float: right">
                    <el-button type="primary" icon="el-icon-plus" @click="handleAddRule">
                      新增规则
                    </el-button>
                    <el-button type="success" icon="el-icon-upload2">批量导入</el-button>
                    <el-button type="warning" icon="el-icon-download">导出</el-button>
                  </div>
                </div>

                <!-- 搜索栏 -->
                <el-form
                  :inline="true"
                  :model="ruleSearchForm"
                  class="demo-form-inline"
                  style="margin-bottom: 20px"
                >
                  <el-form-item label="校验规则编码">
                    <el-input
                      v-model="ruleSearchForm.ruleCode"
                      placeholder="请输入校验规则编码"
                      clearable
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="校验规则名称">
                    <el-input
                      v-model="ruleSearchForm.ruleName"
                      placeholder="请输入校验规则名称"
                      clearable
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="校验方式">
                    <el-select
                      v-model="ruleSearchForm.validationType"
                      placeholder="请选择校验方式"
                      clearable
                    >
                      <el-option label="正则表达式" value="regex"></el-option>
                      <el-option label="自定义方法" value="custom"></el-option>
                      <el-option label="数值范围" value="range"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item>
                    <el-button type="primary" @click="handleRuleSearch" :loading="ruleLoading">
                      查询
                    </el-button>
                    <el-button @click="handleRuleReset">重置</el-button>
                  </el-form-item>
                </el-form>

                <!-- 操作栏 -->
                <div style="margin-bottom: 20px">
                  <el-button
                    type="success"
                    @click="batchEnableRules"
                    :disabled="selectedRules.length === 0"
                  >
                    批量启用
                  </el-button>
                  <el-button
                    type="warning"
                    @click="batchDisableRules"
                    :disabled="selectedRules.length === 0"
                  >
                    批量停用
                  </el-button>
                </div>

                <!-- 数据表格 -->
                <el-table
                  :data="ruleList"
                  v-loading="ruleLoading"
                  @selection-change="handleRuleSelectionChange"
                  border
                  stripe
                  style="width: 100%"
                >
                  <el-table-column type="selection" width="55"></el-table-column>
                  <el-table-column prop="sequence" label="序号" width="80"></el-table-column>
                  <el-table-column
                    prop="ruleCode"
                    label="校验规则编码"
                    width="150"
                  ></el-table-column>
                  <el-table-column
                    prop="ruleName"
                    label="校验规则名称"
                    width="200"
                  ></el-table-column>
                  <el-table-column prop="validationType" label="校验方式" width="120">
                    <template slot-scope="scope">
                      <el-tag :type="getValidationTypeTag(scope.row.validationType)" size="small">
                        {{ getValidationTypeText(scope.row.validationType) }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="expression"
                    label="表达式/脚本"
                    width="200"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column prop="beanId" label="BeanId" width="120"></el-table-column>
                  <el-table-column
                    prop="remark"
                    label="备注"
                    width="150"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column prop="createDate" label="创建日期" width="120"></el-table-column>
                  <el-table-column prop="creator" label="创建人" width="100"></el-table-column>
                  <el-table-column prop="status" label="状态" width="100">
                    <template slot-scope="scope">
                      <el-tag
                        :type="scope.row.status === '启用' ? 'success' : 'danger'"
                        size="small"
                      >
                        {{ scope.row.status }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" width="200" fixed="right">
                    <template slot-scope="scope">
                      <el-button type="text" size="small" @click="handleEditRule(scope.row)">
                        编辑
                      </el-button>
                      <el-button type="text" size="small" @click="handleTestRule(scope.row)">
                        测试
                      </el-button>
                      <el-button
                        type="text"
                        size="small"
                        @click="handleDeleteRule(scope.row)"
                        style="color: #f56c6c"
                      >
                        删除
                      </el-button>
                    </template>
                  </el-table-column>
                </el-table>

                <!-- 分页 -->
                <div style="margin-top: 20px; text-align: right">
                  <el-pagination
                    @size-change="handleRuleSizeChange"
                    @current-change="handleRuleCurrentChange"
                    :current-page="rulePageNum"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="rulePageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="ruleTotal"
                  ></el-pagination>
                </div>
              </el-card>

              <!-- 填报模板管理页面 -->
              <el-card
                id="template-management"
                class="box-card"
                style="margin-bottom: 10px; width: 100%"
              >
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: 600">填报模板管理</span>
                  <div style="float: right">
                    <el-button type="primary" icon="el-icon-plus" @click="handleAddTemplate">
                      新增模板
                    </el-button>
                  </div>
                </div>

                <!-- 搜索栏 -->
                <el-form
                  :inline="true"
                  :model="templateSearchForm"
                  class="demo-form-inline"
                  style="margin-bottom: 20px"
                >
                  <el-form-item label="报表名称">
                    <el-input
                      v-model="templateSearchForm.reportName"
                      placeholder="请输入报表名称"
                      clearable
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="映射表英文名">
                    <el-input
                      v-model="templateSearchForm.tableNameEn"
                      placeholder="请输入映射表英文名"
                      clearable
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="使用条线">
                    <el-select
                      v-model="templateSearchForm.businessLine"
                      placeholder="请选择使用条线"
                      clearable
                    >
                      <el-option label="公司金融" value="corporate"></el-option>
                      <el-option label="零售金融" value="retail"></el-option>
                      <el-option label="金融市场" value="market"></el-option>
                      <el-option label="风险管理" value="risk"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="填报周期">
                    <el-select
                      v-model="templateSearchForm.cycle"
                      placeholder="请选择填报周期"
                      clearable
                    >
                      <el-option label="日" value="daily"></el-option>
                      <el-option label="周" value="weekly"></el-option>
                      <el-option label="月" value="monthly"></el-option>
                      <el-option label="季" value="quarterly"></el-option>
                      <el-option label="年" value="yearly"></el-option>
                      <el-option label="不定期" value="irregular"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item>
                    <el-button
                      type="primary"
                      @click="handleTemplateSearch"
                      :loading="templateLoading"
                    >
                      查询
                    </el-button>
                    <el-button @click="handleTemplateReset">重置</el-button>
                  </el-form-item>
                </el-form>

                <!-- 操作栏 -->
                <div style="margin-bottom: 20px">
                  <el-button
                    type="success"
                    @click="batchEnableTemplates"
                    :disabled="selectedTemplates.length === 0"
                  >
                    批量启用
                  </el-button>
                  <el-button
                    type="warning"
                    @click="batchDisableTemplates"
                    :disabled="selectedTemplates.length === 0"
                  >
                    批量停用
                  </el-button>
                </div>

                <!-- 数据表格 -->
                <el-table
                  :data="templateList"
                  v-loading="templateLoading"
                  @selection-change="handleTemplateSelectionChange"
                  border
                  stripe
                  style="width: 100%"
                >
                  <el-table-column type="selection" width="55"></el-table-column>
                  <el-table-column prop="reportName" label="报表名称" width="200"></el-table-column>
                  <el-table-column
                    prop="tableNameEn"
                    label="映射表英文名"
                    width="150"
                  ></el-table-column>
                  <el-table-column
                    prop="tableNameCn"
                    label="映射表中文名"
                    width="150"
                  ></el-table-column>
                  <el-table-column prop="businessLine" label="使用条线" width="120">
                    <template slot-scope="scope">
                      <el-tag :type="getBusinessLineTag(scope.row.businessLine)" size="small">
                        {{ getBusinessLineText(scope.row.businessLine) }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column prop="cycle" label="填报周期" width="100">
                    <template slot-scope="scope">
                      <el-tag :type="getCycleTag(scope.row.cycle)" size="small">
                        {{ getCycleText(scope.row.cycle) }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column prop="hasTarget" label="是否有目标值" width="120">
                    <template slot-scope="scope">
                      <el-tag :type="scope.row.hasTarget ? 'success' : 'info'" size="small">
                        {{ scope.row.hasTarget ? '是' : '否' }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="fillingLevel"
                    label="填报层级"
                    width="100"
                  ></el-table-column>
                  <el-table-column
                    prop="purpose"
                    label="填报说明"
                    width="200"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column prop="status" label="启用状态" width="100">
                    <template slot-scope="scope">
                      <el-tag
                        :type="scope.row.status === '启用' ? 'success' : 'danger'"
                        size="small"
                      >
                        {{ scope.row.status }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="maintainerName"
                    label="最后维护人姓名"
                    width="120"
                  ></el-table-column>
                  <el-table-column
                    prop="maintainerId"
                    label="最后维护人工号"
                    width="120"
                  ></el-table-column>
                  <el-table-column
                    prop="maintainTime"
                    label="最后维护时间"
                    width="180"
                  ></el-table-column>
                  <el-table-column label="操作" width="250" fixed="right">
                    <template slot-scope="scope">
                      <el-button type="text" size="small" @click="handleEditTemplate(scope.row)">
                        编辑
                      </el-button>
                      <el-button type="text" size="small" @click="handlePreviewTemplate(scope.row)">
                        预览
                      </el-button>
                      <el-button type="text" size="small" @click="handleConfigTemplate(scope.row)">
                        配置
                      </el-button>
                    </template>
                  </el-table-column>
                </el-table>

                <!-- 分页 -->
                <div style="margin-top: 20px; text-align: right">
                  <el-pagination
                    @size-change="handleTemplateSizeChange"
                    @current-change="handleTemplateCurrentChange"
                    :current-page="templatePageNum"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="templatePageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="templateTotal"
                  ></el-pagination>
                </div>
              </el-card>
            </div>

            <!-- 案防统计管理页面 -->
            <div id="case-prevention-management" class="page-content">
              <el-row :gutter="20" style="height: calc(100vh - 120px)">
                <!-- 左侧版本管理区 -->
                <el-col :span="6">
                  <el-card style="height: 100%">
                    <div slot="header" class="clearfix">
                      <span style="font-size: 16px; font-weight: bold">版本</span>
                    </div>

                    <!-- 新建版本按钮 -->
                    <div style="margin-bottom: 20px">
                      <el-button
                        type="primary"
                        icon="el-icon-plus"
                        @click="handleCreateNewVersion"
                        style="width: 100%"
                      >
                        新建版本
                      </el-button>
                    </div>

                    <!-- 版本列表 -->
                    <div
                      style="max-height: calc(100vh - 200px); overflow-y: auto; padding: 4px 8px"
                    >
                      <div
                        v-for="version in versionList"
                        :key="version.id"
                        :class="['version-card', { 'active': currentVersion === version.id }]"
                        @click="handleVersionSelect(version.id)"
                        style="
                          margin-bottom: 12px;
                          padding: 12px;
                          border: 1px solid #e4e7ed;
                          border-radius: 4px;
                          cursor: pointer;
                          transition: all 0.3s;
                        "
                      >
                        <div
                          style="
                            display: flex;
                            justify-content: space-between;
                            align-items: center;
                            margin-bottom: 8px;
                          "
                        >
                          <span style="font-weight: bold; font-size: 14px">{{ version.name }}</span>
                          <el-tag :type="getVersionStatusType(version.status)" size="mini">
                            {{ version.status }}
                          </el-tag>
                        </div>
                        <div style="color: #909399; font-size: 12px; margin-bottom: 4px">
                          创建: {{ version.createTime }}
                        </div>
                        <div style="color: #909399; font-size: 12px">
                          项目: {{ version.projectCount }}个
                        </div>
                      </div>
                    </div>
                  </el-card>
                </el-col>

                <!-- 右侧项目详情区 -->
                <el-col :span="18">
                  <el-card style="height: 100%">
                    <div slot="header" class="clearfix">
                      <span style="font-size: 16px; font-weight: bold">详情</span>
                      <div style="float: right; color: #909399; font-size: 14px">
                        <span v-if="currentVersionInfo.name">
                          当前版本: {{ currentVersionInfo.name }}
                        </span>
                        <el-tag
                          v-if="currentVersionInfo.status"
                          :type="getVersionStatusType(currentVersionInfo.status)"
                          size="small"
                          style="margin-left: 10px"
                        >
                          {{ currentVersionInfo.status }}
                        </el-tag>
                      </div>
                    </div>

                    <!-- 搜索栏 -->
                    <el-form
                      :inline="true"
                      :model="casePreventionSearchForm"
                      class="demo-form-inline"
                      style="margin-bottom: 20px"
                    >
                      <el-form-item label="项目名称">
                        <el-input
                          v-model="casePreventionSearchForm.projectName"
                          placeholder="请输入项目名称"
                          clearable
                          style="width: 200px"
                        ></el-input>
                      </el-form-item>
                      <el-form-item>
                        <el-button
                          type="primary"
                          @click="handleCasePreventionSearch"
                          :loading="casePreventionLoading"
                        >
                          查询
                        </el-button>
                        <el-button @click="handleCasePreventionReset">重置</el-button>
                      </el-form-item>
                    </el-form>

                    <!-- 操作栏 -->
                    <div style="margin-bottom: 20px">
                      <el-button type="primary" icon="el-icon-plus" @click="handleAddProjectType">
                        新增项目类型
                      </el-button>
                    </div>

                    <!-- 树形表格 -->
                    <div style="height: calc(100vh - 400px); overflow-y: auto">
                      <el-table
                        :data="casePreventionList"
                        v-loading="casePreventionLoading"
                        border
                        stripe
                        style="width: 100%"
                        row-key="id"
                        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
                        :expand-row-keys="expandedKeys"
                        @expand-change="handleExpandChange"
                      >
                        <el-table-column prop="name" label="名称" width="300" show-overflow-tooltip>
                          <template slot-scope="scope">
                            <span v-if="scope.row.type === 'projectType'" style="font-weight: bold">
                              <i class="el-icon-folder"></i>
                              {{ scope.row.name }}
                            </span>
                            <span v-else style="margin-left: 20px; color: #606266">
                              <i class="el-icon-document"></i>
                              {{ scope.row.name }}
                            </span>
                          </template>
                        </el-table-column>
                        <el-table-column
                          prop="code"
                          label="编码"
                          width="150"
                          show-overflow-tooltip
                        ></el-table-column>
                        <el-table-column
                          prop="description"
                          label="描述"
                          show-overflow-tooltip
                        ></el-table-column>
                        <el-table-column
                          prop="fillingLine"
                          label="填报条线"
                          width="120"
                          show-overflow-tooltip
                        ></el-table-column>
                        <el-table-column prop="unit" label="单位" width="80" align="center">
                          <template slot-scope="scope">
                            <span v-if="scope.row.type === 'project'">
                              {{ scope.row.unit || '-' }}
                            </span>
                            <span v-else>-</span>
                          </template>
                        </el-table-column>
                        <el-table-column
                          prop="reportingScope"
                          label="填报口径说明"
                          width="200"
                          show-overflow-tooltip
                        ></el-table-column>
                        <el-table-column
                          prop="basicValidation"
                          label="逻辑基础校验关系"
                          width="200"
                          show-overflow-tooltip
                        ></el-table-column>
                        <el-table-column
                          prop="specificValidation"
                          label="具体逻辑校验关系"
                          width="200"
                          show-overflow-tooltip
                        ></el-table-column>
                        <el-table-column
                          prop="createTime"
                          label="创建时间"
                          width="180"
                          show-overflow-tooltip
                        ></el-table-column>
                        <el-table-column label="操作" width="200" align="center" fixed="right">
                          <template slot-scope="scope">
                            <el-button
                              v-if="scope.row.type === 'projectType'"
                              type="text"
                              size="small"
                              @click="handleAddProject(scope.row)"
                            >
                              新增项目
                            </el-button>
                            <el-button
                              type="text"
                              size="small"
                              @click="handleEditCasePrevention(scope.row)"
                            >
                              编辑
                            </el-button>
                            <el-button
                              type="text"
                              size="small"
                              @click="handleDeleteCasePrevention(scope.row)"
                              style="color: #f56c6c"
                            >
                              删除
                            </el-button>
                          </template>
                        </el-table-column>
                      </el-table>
                    </div>

                    <!-- 分页 -->
                    <div style="margin-top: 20px; text-align: right">
                      <el-pagination
                        @size-change="handleCasePreventionSizeChange"
                        @current-change="handleCasePreventionCurrentChange"
                        :current-page="casePreventionPageNum"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="casePreventionPageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="casePreventionTotal"
                      ></el-pagination>
                    </div>
                  </el-card>
                </el-col>
              </el-row>
            </div>

            <!-- 数据填报页面 -->
            <div id="data-filling" class="page-content">
              <el-card style="margin-bottom: 20px">
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: bold">数据填报</span>
                  <div style="float: right">
                    <el-button type="primary" size="small" @click="refreshDataFilling">
                      <i class="el-icon-refresh"></i>
                      刷新
                    </el-button>
                  </div>
                </div>

                <!-- 搜索栏 -->
                <el-form
                  :inline="true"
                  :model="dataFillingSearchForm"
                  class="demo-form-inline"
                  style="margin-bottom: 20px"
                >
                  <el-form-item label="任务名称">
                    <el-input
                      v-model="dataFillingSearchForm.taskName"
                      placeholder="请输入任务名称"
                      style="width: 200px"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="数据日期">
                    <el-date-picker
                      v-model="dataFillingSearchForm.dataDateRange"
                      type="daterange"
                      range-separator="至"
                      start-placeholder="开始日期"
                      end-placeholder="结束日期"
                      style="width: 240px"
                      :picker-options="{
                        shortcuts: [{
                          text: '最近一周',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                            picker.$emit('pick', [start, end]);
                          }
                        }, {
                          text: '最近一个月',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                          }
                        }, {
                          text: '最近三个月',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                          }
                        }]
                      }"
                    ></el-date-picker>
                  </el-form-item>
                  <el-form-item label="报表周期">
                    <el-select
                      v-model="dataFillingSearchForm.cycle"
                      placeholder="请选择报表周期"
                      style="width: 150px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="日报" value="日报"></el-option>
                      <el-option label="周报" value="周报"></el-option>
                      <el-option label="月报" value="月报"></el-option>
                      <el-option label="季报" value="季报"></el-option>
                      <el-option label="年报" value="年报"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item>
                    <el-button type="primary" @click="searchDataFilling">查询</el-button>
                    <el-button @click="resetDataFillingSearch">重置</el-button>
                  </el-form-item>
                </el-form>

                <!-- 状态切换标签 -->
                <el-tabs v-model="dataFillingActiveTab">
                  <el-tab-pane label="待填报" name="pending">
                    <el-table
                      :data="pendingTaskList"
                      v-loading="dataFillingLoading"
                      border
                      style="width: 100%"
                      @selection-change="handlePendingTaskSelectionChange"
                    >
                      <el-table-column type="selection" width="55" align="center"></el-table-column>
                      <el-table-column
                        type="index"
                        label="序号"
                        width="80"
                        align="center"
                      ></el-table-column>
                      <el-table-column
                        prop="taskName"
                        label="任务名称"
                        width="200"
                        show-overflow-tooltip
                      ></el-table-column>
                      <el-table-column prop="cycle" label="报表周期" width="100" align="center">
                        <template slot-scope="scope">
                          <el-tag size="mini">{{ scope.row.cycle }}</el-tag>
                        </template>
                      </el-table-column>
                      <el-table-column
                        prop="dataDate"
                        label="数据日期"
                        width="120"
                        align="center"
                      ></el-table-column>
                      <el-table-column
                        prop="publisher"
                        label="任务发布人"
                        width="120"
                        align="center"
                      ></el-table-column>
                      <el-table-column
                        prop="publishOrg"
                        label="任务发布单位"
                        width="160"
                        align="center"
                      ></el-table-column>
                      <el-table-column
                        prop="publishTime"
                        label="任务发布时间"
                        width="160"
                        align="center"
                      ></el-table-column>
                      <el-table-column label="操作" width="380" align="center" fixed="right">
                        <template slot-scope="scope">
                          <el-button type="text" size="small" @click="openDataUpload(scope.row)">
                            <i class="el-icon-upload"></i>
                            数据上传
                          </el-button>
                          <el-button type="text" size="small" @click="openFillingDetail(scope.row)">
                            <i class="el-icon-edit"></i>
                            直接填报
                          </el-button>
                          <el-button
                            v-if="scope.row.reportName === '银行业金融机构案防情况统计表'"
                            type="text"
                            size="small"
                            @click="openInlineEdit(scope.row)"
                            style="color: #409eff"
                          >
                            <i class="el-icon-document"></i>
                            填报详情
                          </el-button>
                        </template>
                      </el-table-column>
                    </el-table>

                    <div style="margin-top: 20px; text-align: right">
                      <el-pagination
                        @size-change="handlePendingTaskSizeChange"
                        @current-change="handlePendingTaskCurrentChange"
                        :current-page="pendingTaskPageNum"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="pendingTaskPageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="pendingTaskTotal"
                      ></el-pagination>
                    </div>
                  </el-tab-pane>

                  <el-tab-pane label="已填报" name="completed">
                    <el-table
                      :data="completedTaskList"
                      v-loading="dataFillingLoading"
                      border
                      style="width: 100%"
                      @selection-change="handleCompletedTaskSelectionChange"
                    >
                      <el-table-column type="selection" width="55" align="center"></el-table-column>
                      <el-table-column
                        type="index"
                        label="序号"
                        width="80"
                        align="center"
                      ></el-table-column>
                      <el-table-column
                        prop="taskName"
                        label="任务名称"
                        width="200"
                        show-overflow-tooltip
                      ></el-table-column>
                      <el-table-column prop="cycle" label="报表周期" width="100" align="center">
                        <template slot-scope="scope">
                          <el-tag size="mini">{{ scope.row.cycle }}</el-tag>
                        </template>
                      </el-table-column>
                      <el-table-column
                        prop="dataDate"
                        label="数据日期"
                        width="120"
                        align="center"
                      ></el-table-column>
                      <el-table-column
                        prop="submitTime"
                        label="填报时间"
                        width="160"
                        align="center"
                      ></el-table-column>
                      <el-table-column
                        prop="fillerName"
                        label="填报人"
                        width="100"
                        align="center"
                      ></el-table-column>
                      <el-table-column
                        prop="fillerId"
                        label="填报工号"
                        width="120"
                        align="center"
                      ></el-table-column>
                      <el-table-column
                        prop="fillerOrg"
                        label="填报人所在机构"
                        width="150"
                        show-overflow-tooltip
                      ></el-table-column>
                      <el-table-column
                        prop="orgCode"
                        label="机构号"
                        width="120"
                        align="center"
                      ></el-table-column>
                      <el-table-column label="操作" width="200" align="center" fixed="right">
                        <template slot-scope="scope">
                          <el-button type="text" size="small" @click="handleUploadData(scope.row)">
                            <i class="el-icon-upload"></i>
                            重新上传
                          </el-button>
                          <el-button type="text" size="small" @click="previewFilledData(scope.row)">
                            <i class="el-icon-view"></i>
                            数据预览
                          </el-button>
                        </template>
                      </el-table-column>
                    </el-table>

                    <div style="margin-top: 20px; text-align: right">
                      <el-pagination
                        @size-change="handleCompletedTaskSizeChange"
                        @current-change="handleCompletedTaskCurrentChange"
                        :current-page="completedTaskPageNum"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="completedTaskPageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="completedTaskTotal"
                      ></el-pagination>
                    </div>
                  </el-tab-pane>
                </el-tabs>
              </el-card>
            </div>

            <!-- 直接填报(案防) -->
            <div id="filling-detail" class="page-content">
              <el-card style="margin-bottom: 20px">
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: bold">
                    直接填报(案防) - 银行业金融机构案防情况统计表
                  </span>
                  <div style="float: right">
                    <el-button type="primary" size="small" @click="saveFillingDetail">
                      <i class="el-icon-check"></i>
                      保存
                    </el-button>
                    <el-button type="success" size="small" @click="submitFillingDetail">
                      <i class="el-icon-upload"></i>
                      提交
                    </el-button>
                    <el-button size="small" @click="goBackToDataFilling">
                      <i class="el-icon-back"></i>
                      返回
                    </el-button>
                  </div>
                </div>

                <!-- 基本信息 -->
                <div
                  style="
                    margin-bottom: 20px;
                    padding: 15px;
                    background-color: #f8f9fa;
                    border-radius: 4px;
                  "
                >
                  <el-row :gutter="20">
                    <el-col :span="6">
                      <div>
                        <strong>任务名称：</strong>
                        2024年第一季度案防情况统计
                      </div>
                    </el-col>
                    <el-col :span="6">
                      <div>
                        <strong>数据日期：</strong>
                        2024-03-31
                      </div>
                    </el-col>
                    <el-col :span="6">
                      <div>
                        <strong>填报周期：</strong>
                        季报
                      </div>
                    </el-col>
                    <el-col :span="6">
                      <div>
                        <strong>填报人：</strong>
                        王** (11223344)
                      </div>
                    </el-col>
                  </el-row>
                </div>

                <!-- 案防情况统计表 -->
                <div style="margin-bottom: 20px">
                  <h3 style="margin-bottom: 15px; color: #409eff">银行业金融机构案防情况统计表</h3>

                  <el-table
                    :data="casePreventionData"
                    border
                    style="width: 100%"
                    :header-cell-style="{ background: '#f5f7fa', color: '#606266', fontWeight: 'bold' }"
                    :span-method="spanMethod"
                  >
                    <el-table-column prop="category" label="项目类别" width="80" fixed="left">
                      <template slot-scope="scope">
                        <div
                          style="
                            color: #333;
                            display: flex;
                            align-items: center;
                            justify-content: flex-start;
                            height: 100%;
                            padding-left: 8px;
                          "
                        >
                          {{ scope.row.category }}
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="item" label="项目" width="300" fixed="left">
                      <template slot-scope="scope">
                        <div
                          v-if="scope.row.level === 2"
                          style="font-weight: bold; color: #333; padding-left: 8px"
                        >
                          {{ scope.row.item }}
                        </div>
                        <div v-else style="color: #333; padding-left: 8px">
                          {{ scope.row.item }}
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column prop="unit" label="单位" width="80" align="center">
                      <template slot-scope="scope">
                        <span>{{ scope.row.unit || '人' }}</span>
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="newAdditions"
                      label="当季度新增数"
                      width="150"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          v-model="scope.row.newAdditions"
                          type="number"
                          size="small"
                          style="width: 120px"
                          @change="handleDataChange(scope.row)"
                        ></el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="duplicates"
                      label="当季新增数中与当年内前期已报送数据的重复数"
                      width="200"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          v-model="scope.row.duplicates"
                          type="number"
                          size="small"
                          style="width: 120px"
                          @change="handleDataChange(scope.row)"
                        ></el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="cumulativeTotal"
                      label="截至本季度末累计总数"
                      width="150"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <!-- 特定字段显示"系统计算" -->
                        <span
                          v-if="[2, 3, 4, 5, 6].includes(scope.row.id)"
                          style="color: #909399; font-style: italic"
                        >
                          系统计算
                        </span>
                        <!-- 其他字段保持可编辑 -->
                        <el-input
                          v-else
                          v-model="scope.row.cumulativeTotal"
                          type="number"
                          size="small"
                          style="width: 120px"
                          @change="handleDataChange(scope.row)"
                        ></el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="responsibleDept"
                      label="填报责任部门"
                      width="200"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <div
                          style="
                            color: #333;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            height: 100%;
                            padding: 8px;
                          "
                        >
                          {{ scope.row.responsibleDept || '-' }}
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="reportingScope"
                      label="填报口径说明(银保监局提供)"
                      width="400"
                      align="left"
                      show-overflow-tooltip
                    >
                      <template slot-scope="scope">
                        <div
                          style="
                            line-height: 1.4;
                            font-size: 12px;
                            color: #666;
                            display: flex;
                            align-items: center;
                            height: 100%;
                            padding: 8px;
                          "
                        >
                          {{ scope.row.reportingScope || '-' }}
                        </div>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>

                <!-- 填报信息表单 -->
                <div style="margin-top: 20px; margin-bottom: 20px">
                  <h4 style="margin-bottom: 15px; color: #409eff; font-size: 16px">附加信息</h4>
                  <el-form :model="fillingForm" label-width="100px" size="small">
                    <el-row :gutter="20">
                      <el-col :span="6">
                        <el-form-item label="填表人：">
                          <el-input
                            v-model="fillingForm.filler"
                            placeholder="请输入填表人姓名"
                          ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="6">
                        <el-form-item label="联系电话：">
                          <el-input
                            v-model="fillingForm.phone"
                            placeholder="请输入联系电话"
                          ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="6">
                        <el-form-item label="复核人：">
                          <el-input
                            v-model="fillingForm.reviewer"
                            placeholder="请输入复核人姓名"
                          ></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :span="6">
                        <el-form-item label="负责人：">
                          <el-input
                            v-model="fillingForm.manager"
                            placeholder="请输入负责人姓名"
                          ></el-input>
                        </el-form-item>
                      </el-col>
                    </el-row>
                  </el-form>
                </div>

                <!-- 操作提示 -->
                <div
                  style="
                    margin-top: 20px;
                    padding: 10px;
                    background-color: #e1f3d8;
                    border-radius: 4px;
                    color: #67c23a;
                  "
                >
                  <i class="el-icon-info"></i>
                  <span style="margin-left: 8px">
                    提示：点击单元格可快速编辑，支持Tab键切换输入框，数据会自动保存到草稿
                  </span>
                </div>
              </el-card>
            </div>

            <!-- 直接填报页面 -->
            <div id="direct-filling-1d" class="page-content">
              <el-card style="margin-bottom: 20px">
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: bold">直接填报</span>
                  <div style="float: right">
                    <el-button type="success" size="small" @click="saveDirectFilling1d">
                      <i class="el-icon-check"></i>
                      保存
                    </el-button>
                    <el-button type="primary" size="small" @click="submitDirectFilling1d">
                      <i class="el-icon-upload"></i>
                      提交
                    </el-button>
                    <el-button type="info" size="small" @click="resetDirectFilling1d">
                      <i class="el-icon-refresh"></i>
                      重置
                    </el-button>
                  </div>
                </div>

                <!-- 填报说明 -->
                <el-alert
                  title="填报说明"
                  type="info"
                  :closable="false"
                  style="margin-bottom: 20px"
                >
                  <p>1. 请按照表格要求填写各项数据，所有必填项不能为空</p>
                  <p>2. 数值类型字段请填写数字，单位统一为"人"</p>
                  <p>3. 填报责任部门请填写具体的部门名称</p>
                  <p>4. 填报范围说明请详细描述统计范围</p>
                </el-alert>

                <!-- 多级表头表格 -->
                <el-table
                  :data="directFilling1dData.tableData"
                  border
                  stripe
                  style="width: 100%"
                  :header-cell-style="{ background: '#f5f7fa', color: '#606266', textAlign: 'center' }"
                  :cell-style="{ textAlign: 'center' }"
                >
                  <!-- 周计划 -->
                  <el-table-column label="周计划" align="center">
                    <el-table-column label="周目标" prop="weekly_target" align="center" width="120">
                      <template slot-scope="scope">
                        <el-input
                          v-model.number="scope.row.weekly_target"
                          type="number"
                          size="mini"
                          placeholder="请输入数值"
                        ></el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="本周累计"
                      prop="weekly_accumulated"
                      align="center"
                      width="120"
                    >
                      <template slot-scope="scope">
                        <el-input
                          v-model.number="scope.row.weekly_accumulated"
                          type="number"
                          size="mini"
                          placeholder="请输入数值"
                        ></el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="完成率"
                      prop="weekly_completion_rate"
                      align="center"
                      width="120"
                    >
                      <template slot-scope="scope">
                        <el-input
                          v-model.number="scope.row.weekly_completion_rate"
                          type="number"
                          size="mini"
                          placeholder="请输入百分比"
                        ></el-input>
                      </template>
                    </el-table-column>
                  </el-table-column>

                  <!-- 5年交长期交 -->
                  <el-table-column label="5年交长期交" align="center">
                    <!-- 累计 -->
                    <el-table-column label="累计" align="center">
                      <el-table-column
                        label="目标"
                        prop="cumulative_target"
                        align="center"
                        width="120"
                      >
                        <template slot-scope="scope">
                          <el-input
                            v-model.number="scope.row.cumulative_target"
                            type="number"
                            size="mini"
                            placeholder="请输入数值"
                          ></el-input>
                        </template>
                      </el-table-column>
                      <el-table-column
                        label="5年交长期交保费"
                        prop="cumulative_premium"
                        align="center"
                        width="150"
                      >
                        <template slot-scope="scope">
                          <el-input
                            v-model.number="scope.row.cumulative_premium"
                            type="number"
                            size="mini"
                            placeholder="请输入数值"
                          ></el-input>
                        </template>
                      </el-table-column>
                      <el-table-column
                        label="完成率"
                        prop="cumulative_completion_rate"
                        align="center"
                        width="120"
                      >
                        <template slot-scope="scope">
                          <el-input
                            v-model.number="scope.row.cumulative_completion_rate"
                            type="number"
                            size="mini"
                            placeholder="请输入百分比"
                          ></el-input>
                        </template>
                      </el-table-column>
                      <el-table-column
                        label="排名"
                        prop="cumulative_ranking"
                        align="center"
                        width="100"
                      >
                        <template slot-scope="scope">
                          <el-input
                            v-model.number="scope.row.cumulative_ranking"
                            type="number"
                            size="mini"
                            placeholder="请输入排名"
                          ></el-input>
                        </template>
                      </el-table-column>
                    </el-table-column>

                    <!-- 其中 -->
                    <el-table-column label="其中" align="center">
                      <!-- 5年交终身寿险(分红险) -->
                      <el-table-column label="5年交终身寿险(分红险)" align="center">
                        <el-table-column
                          label="保费"
                          prop="whole_life_premium"
                          align="center"
                          width="120"
                        >
                          <template slot-scope="scope">
                            <el-input
                              v-model.number="scope.row.whole_life_premium"
                              type="number"
                              size="mini"
                              placeholder="请输入保费"
                            ></el-input>
                          </template>
                        </el-table-column>
                        <el-table-column
                          label="完成率"
                          prop="whole_life_completion_rate"
                          align="center"
                          width="120"
                        >
                          <template slot-scope="scope">
                            <el-input
                              v-model.number="scope.row.whole_life_completion_rate"
                              type="number"
                              size="mini"
                              placeholder="请输入百分比"
                            ></el-input>
                          </template>
                        </el-table-column>
                      </el-table-column>

                      <!-- 健康险 -->
                      <el-table-column label="健康险" align="center">
                        <el-table-column
                          label="保费"
                          prop="health_premium"
                          align="center"
                          width="120"
                        >
                          <template slot-scope="scope">
                            <el-input
                              v-model.number="scope.row.health_premium"
                              type="number"
                              size="mini"
                              placeholder="请输入保费"
                            ></el-input>
                          </template>
                        </el-table-column>
                        <el-table-column
                          label="完成率"
                          prop="health_completion_rate"
                          align="center"
                          width="120"
                        >
                          <template slot-scope="scope">
                            <el-input
                              v-model.number="scope.row.health_completion_rate"
                              type="number"
                              size="mini"
                              placeholder="请输入百分比"
                            ></el-input>
                          </template>
                        </el-table-column>
                      </el-table-column>
                    </el-table-column>
                  </el-table-column>
                </el-table>

                <!-- 操作按钮 -->
                <div style="margin-top: 20px; text-align: center">
                  <el-button
                    type="success"
                    @click="saveDirectFilling1d"
                    :loading="directFilling1dData.saving"
                  >
                    <i class="el-icon-check"></i>
                    保存数据
                  </el-button>
                  <el-button
                    type="primary"
                    @click="submitDirectFilling1d"
                    :loading="directFilling1dData.submitting"
                  >
                    <i class="el-icon-upload"></i>
                    提交数据
                  </el-button>
                  <el-button type="warning" @click="resetDirectFilling1d">
                    <i class="el-icon-refresh"></i>
                    重置数据
                  </el-button>
                </div>
              </el-card>
            </div>

            <!-- 目标管理页面 -->
            <div id="target-management" class="page-content">
              <el-card style="margin-bottom: 20px">
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: bold">目标管理</span>
                  <div style="float: right">
                    <el-button type="primary" size="small" @click="handleAddTarget">
                      <i class="el-icon-plus"></i>
                      新增目标
                    </el-button>
                    <el-button type="success" size="small" @click="batchEnableTarget">
                      <i class="el-icon-check"></i>
                      批量启用
                    </el-button>
                    <el-button type="warning" size="small" @click="batchDisableTarget">
                      <i class="el-icon-close"></i>
                      批量停用
                    </el-button>
                  </div>
                </div>

                <!-- 搜索栏 -->
                <el-form
                  :inline="true"
                  :model="targetSearchForm"
                  class="demo-form-inline"
                  style="margin-bottom: 20px"
                >
                  <el-form-item label="目标名称">
                    <el-input
                      v-model="targetSearchForm.targetName"
                      placeholder="请输入目标名称"
                      style="width: 200px"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="业务线">
                    <el-select
                      v-model="targetSearchForm.businessLine"
                      placeholder="请选择业务线"
                      style="width: 150px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="个人金融" value="个人金融"></el-option>
                      <el-option label="公司金融" value="公司金融"></el-option>
                      <el-option label="金融市场" value="金融市场"></el-option>
                      <el-option label="投资银行" value="投资银行"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="目标周期">
                    <el-select
                      v-model="targetSearchForm.targetCycle"
                      placeholder="请选择目标周期"
                      style="width: 150px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="月度" value="月度"></el-option>
                      <el-option label="季度" value="季度"></el-option>
                      <el-option label="年度" value="年度"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="启用状态">
                    <el-select
                      v-model="targetSearchForm.status"
                      placeholder="请选择启用状态"
                      style="width: 120px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="启用" value="启用"></el-option>
                      <el-option label="停用" value="停用"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item>
                    <el-button type="primary" @click="searchTarget">查询</el-button>
                    <el-button @click="resetTargetSearch">重置</el-button>
                  </el-form-item>
                </el-form>

                <!-- 目标列表 -->
                <el-table
                  :data="targetList"
                  v-loading="targetLoading"
                  border
                  style="width: 100%"
                  @selection-change="handleTargetSelectionChange"
                >
                  <el-table-column type="selection" width="55" align="center"></el-table-column>
                  <el-table-column
                    prop="targetName"
                    label="目标名称"
                    min-width="200"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column
                    prop="businessLine"
                    label="业务线"
                    width="120"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="targetCycle" label="目标周期" width="100" align="center">
                    <template slot-scope="scope">
                      <el-tag size="mini">{{ scope.row.targetCycle }}</el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="targetYear"
                    label="目标年度"
                    width="100"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="unit"
                    label="单位"
                    width="80"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="createTime"
                    label="创建时间"
                    width="160"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="status" label="启用状态" width="100" align="center">
                    <template slot-scope="scope">
                      <el-tag :type="scope.row.status === '启用' ? 'success' : 'info'" size="mini">
                        {{ scope.row.status }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" width="200" align="center" fixed="right">
                    <template slot-scope="scope">
                      <el-button type="text" size="small" @click="handleEditTarget(scope.row)">
                        <i class="el-icon-edit"></i>
                        编辑
                      </el-button>
                      <el-button
                        type="text"
                        size="small"
                        @click="handleTargetAllocation(scope.row)"
                      >
                        <i class="el-icon-s-custom"></i>
                        目标分配
                      </el-button>
                    </template>
                  </el-table-column>
                </el-table>

                <div style="margin-top: 20px; text-align: right">
                  <el-pagination
                    @size-change="handleTargetSizeChange"
                    @current-change="handleTargetCurrentChange"
                    :current-page="targetPageNum"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="targetPageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="targetTotal"
                  ></el-pagination>
                </div>
              </el-card>
            </div>

            <!-- 目标值分配页面 -->
            <div id="target-filling" class="page-content">
              <el-card style="margin-bottom: 20px">
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: bold">目标值分配</span>
                  <div style="float: right">
                    <el-button type="primary" size="small" @click="refreshTargetFilling">
                      <i class="el-icon-refresh"></i>
                      刷新
                    </el-button>
                  </div>
                </div>

                <!-- 搜索栏 -->
                <el-form
                  :inline="true"
                  :model="targetFillingSearchForm"
                  class="demo-form-inline"
                  style="margin-bottom: 20px"
                >
                  <el-form-item label="目标名称">
                    <el-input
                      v-model="targetFillingSearchForm.targetName"
                      placeholder="请输入目标名称"
                      style="width: 200px"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="业务线">
                    <el-select
                      v-model="targetFillingSearchForm.businessLine"
                      placeholder="请选择业务线"
                      style="width: 150px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="个人金融" value="个人金融"></el-option>
                      <el-option label="公司金融" value="公司金融"></el-option>
                      <el-option label="金融市场" value="金融市场"></el-option>
                      <el-option label="投资银行" value="投资银行"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="填报周期">
                    <el-select
                      v-model="targetFillingSearchForm.fillingCycle"
                      placeholder="请选择填报周期"
                      style="width: 150px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="月度" value="月度"></el-option>
                      <el-option label="季度" value="季度"></el-option>
                      <el-option label="年度" value="年度"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="填报状态">
                    <el-select
                      v-model="targetFillingSearchForm.status"
                      placeholder="请选择填报状态"
                      style="width: 120px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="待填报" value="待填报"></el-option>
                      <el-option label="已填报" value="已填报"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item>
                    <el-button type="primary" @click="searchTargetFilling">查询</el-button>
                    <el-button @click="resetTargetFillingSearch">重置</el-button>
                  </el-form-item>
                </el-form>

                <!-- 目标值分配列表 -->
                <el-table
                  :data="targetFillingList"
                  v-loading="targetFillingLoading"
                  border
                  style="width: 100%"
                  @selection-change="handleTargetFillingSelectionChange"
                >
                  <el-table-column type="selection" width="55" align="center"></el-table-column>
                  <el-table-column
                    prop="targetName"
                    label="目标名称"
                    min-width="200"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column
                    prop="businessLine"
                    label="业务线"
                    width="120"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="fillingCycle" label="填报周期" width="100" align="center">
                    <template slot-scope="scope">
                      <el-tag size="mini">{{ scope.row.fillingCycle }}</el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="unit"
                    label="单位"
                    width="80"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="allocatedValue" label="分配值" width="120" align="right">
                    <template slot-scope="scope">
                      <span style="color: #67c23a; font-weight: bold">
                        {{ scope.row.allocatedValue }}
                      </span>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="deadline"
                    label="截止时间"
                    width="160"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="status" label="填报状态" width="100" align="center">
                    <template slot-scope="scope">
                      <el-tag :type="getTargetFillingStatusType(scope.row.status)" size="mini">
                        {{ scope.row.status }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" width="200" align="center" fixed="right">
                    <template slot-scope="scope">
                      <el-button
                        v-if="scope.row.status === '待填报'"
                        type="text"
                        size="small"
                        @click="startTargetFilling(scope.row)"
                      >
                        <i class="el-icon-edit"></i>
                        开始分配
                      </el-button>
                      <el-button
                        v-if="scope.row.status === '已填报'"
                        type="text"
                        size="small"
                        @click="editTargetFilling(scope.row)"
                      >
                        <i class="el-icon-edit"></i>
                        修改分配
                      </el-button>
                      <el-button
                        type="text"
                        size="small"
                        @click="viewTargetFillingDetail(scope.row)"
                      >
                        <i class="el-icon-view"></i>
                        查看详情
                      </el-button>
                    </template>
                  </el-table-column>
                </el-table>

                <div style="margin-top: 20px; text-align: right">
                  <el-pagination
                    @size-change="handleTargetFillingSizeChange"
                    @current-change="handleTargetFillingCurrentChange"
                    :current-page="targetFillingPageNum"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="targetFillingPageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="targetFillingTotal"
                  ></el-pagination>
                </div>
              </el-card>
            </div>

            <!-- 填报情况统计页面 -->
            <div id="report-collection-detail" class="page-content">
              <el-card style="margin-bottom: 20px">
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: bold">填报情况统计</span>
                </div>

                <!-- 搜索栏 -->
                <el-form
                  :inline="true"
                  :model="reportCollectionSearchForm"
                  class="demo-form-inline"
                  style="margin-bottom: 20px"
                >
                  <el-form-item label="报表名称">
                    <el-input
                      v-model="reportCollectionSearchForm.reportName"
                      placeholder="请输入报表名称"
                      style="width: 200px"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="业务线">
                    <el-select
                      v-model="reportCollectionSearchForm.businessLine"
                      placeholder="请选择业务线"
                      style="width: 150px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="个人金融" value="个人金融"></el-option>
                      <el-option label="公司金融" value="公司金融"></el-option>
                      <el-option label="金融市场" value="金融市场"></el-option>
                      <el-option label="投资银行" value="投资银行"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="报表周期">
                    <el-select
                      v-model="reportCollectionSearchForm.cycle"
                      placeholder="请选择报表周期"
                      style="width: 150px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="日报" value="日报"></el-option>
                      <el-option label="周报" value="周报"></el-option>
                      <el-option label="月报" value="月报"></el-option>
                      <el-option label="季报" value="季报"></el-option>
                      <el-option label="年报" value="年报"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="数据日期">
                    <el-date-picker
                      v-model="reportCollectionSearchForm.dataDateRange"
                      type="daterange"
                      range-separator="至"
                      start-placeholder="开始日期"
                      end-placeholder="结束日期"
                      :picker-options="{
                        shortcuts: [{
                          text: '最近一周',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                            picker.$emit('pick', [start, end]);
                          }
                        }, {
                          text: '最近一个月',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                          }
                        }, {
                          text: '最近三个月',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                          }
                        }]
                      }"
                    ></el-date-picker>
                  </el-form-item>
                  <el-form-item>
                    <el-button type="primary" @click="searchReportCollection">查询</el-button>
                    <el-button @click="resetReportCollectionSearch">重置</el-button>
                  </el-form-item>
                </el-form>

                <!-- 统计概览 -->
                <el-row :gutter="20" style="margin-bottom: 20px">
                  <el-col :span="6">
                    <el-card class="box-card" style="text-align: center">
                      <div style="font-size: 24px; color: #409eff; font-weight: bold">
                        {{ reportCollectionStats.totalReports }}
                      </div>
                      <div style="color: #909399; margin-top: 5px">总报表数</div>
                    </el-card>
                  </el-col>
                  <el-col :span="6">
                    <el-card class="box-card" style="text-align: center">
                      <div style="font-size: 24px; color: #67c23a; font-weight: bold">
                        {{ reportCollectionStats.completedReports }}
                      </div>
                      <div style="color: #909399; margin-top: 5px">已完成</div>
                    </el-card>
                  </el-col>
                  <el-col :span="6">
                    <el-card class="box-card" style="text-align: center">
                      <div style="font-size: 24px; color: #e6a23c; font-weight: bold">
                        {{ reportCollectionStats.pendingReports }}
                      </div>
                      <div style="color: #909399; margin-top: 5px">待填报</div>
                    </el-card>
                  </el-col>
                  <el-col :span="6">
                    <el-card class="box-card" style="text-align: center">
                      <div style="font-size: 24px; color: #f56c6c; font-weight: bold">
                        {{ reportCollectionStats.overdueReports }}
                      </div>
                      <div style="color: #909399; margin-top: 5px">已超期</div>
                    </el-card>
                  </el-col>
                </el-row>

                <!-- 填报情况统计列表 -->
                <el-table
                  :data="reportCollectionList"
                  v-loading="reportCollectionLoading"
                  border
                  style="width: 100%"
                  @selection-change="handleReportCollectionSelectionChange"
                >
                  <el-table-column type="selection" width="55" align="center"></el-table-column>
                  <el-table-column
                    type="index"
                    label="序号"
                    width="80"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="reportName"
                    label="报表名称"
                    width="200"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column
                    prop="businessLine"
                    label="业务线"
                    width="120"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="cycle" label="报表周期" width="100" align="center">
                    <template slot-scope="scope">
                      <el-tag size="mini">{{ scope.row.cycle }}</el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="dataDate"
                    label="数据日期"
                    width="120"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="fillingLevel"
                    label="填报层级"
                    width="100"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="totalOrgs" label="应填报机构数" width="120" align="center">
                    <template slot-scope="scope">
                      <span style="color: #409eff; font-weight: bold">
                        {{ scope.row.totalOrgs }}
                      </span>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="completedOrgs"
                    label="已填报机构数"
                    width="120"
                    align="center"
                  >
                    <template slot-scope="scope">
                      <span style="color: #67c23a; font-weight: bold">
                        {{ scope.row.completedOrgs }}
                      </span>
                    </template>
                  </el-table-column>
                  <el-table-column prop="completionRate" label="完成率" width="100" align="center">
                    <template slot-scope="scope">
                      <el-tag :type="getCompletionRateType(scope.row.completionRate)" size="mini">
                        {{ scope.row.completionRate }}%
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="deadline"
                    label="截止时间"
                    width="160"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="status" label="状态" width="100" align="center">
                    <template slot-scope="scope">
                      <el-tag :type="getReportCollectionStatusType(scope.row.status)" size="mini">
                        {{ scope.row.status }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" width="200" align="center" fixed="right">
                    <template slot-scope="scope">
                      <el-button type="text" size="small" @click="viewReportDetail(scope.row)">
                        <i class="el-icon-view"></i>
                        查看详情
                      </el-button>
                      <el-button type="text" size="small" @click="viewOrgProgress(scope.row)">
                        <i class="el-icon-s-data"></i>
                        机构进度
                      </el-button>
                    </template>
                  </el-table-column>
                </el-table>

                <div style="margin-top: 20px; text-align: right">
                  <el-pagination
                    @size-change="handleReportCollectionSizeChange"
                    @current-change="handleReportCollectionCurrentChange"
                    :current-page="reportCollectionPageNum"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="reportCollectionPageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="reportCollectionTotal"
                  ></el-pagination>
                </div>
              </el-card>
            </div>

            <!-- 填报明细页面 -->
            <div id="filling-detail-list" class="page-content">
              <el-card style="margin-bottom: 20px">
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: bold">填报明细</span>
                </div>

                <!-- 搜索栏 -->
                <el-form
                  :inline="true"
                  :model="fillingDetailSearchForm"
                  class="demo-form-inline"
                  style="margin-bottom: 20px"
                >
                  <el-form-item label="任务名称">
                    <el-input
                      v-model="fillingDetailSearchForm.taskName"
                      placeholder="请输入任务名称"
                      style="width: 200px"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="数据日期">
                    <el-date-picker
                      v-model="fillingDetailSearchForm.dataDateRange"
                      type="daterange"
                      range-separator="至"
                      start-placeholder="开始日期"
                      end-placeholder="结束日期"
                      :picker-options="{
                        shortcuts: [{
                          text: '最近一周',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                            picker.$emit('pick', [start, end]);
                          }
                        }, {
                          text: '最近一个月',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                          }
                        }, {
                          text: '最近三个月',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                          }
                        }]
                      }"
                    ></el-date-picker>
                  </el-form-item>
                  <el-form-item label="填报周期">
                    <el-select
                      v-model="fillingDetailSearchForm.cycle"
                      placeholder="请选择填报周期"
                      style="width: 150px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="日报" value="日报"></el-option>
                      <el-option label="周报" value="周报"></el-option>
                      <el-option label="月报" value="月报"></el-option>
                      <el-option label="季报" value="季报"></el-option>
                      <el-option label="年报" value="年报"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="填报人所在机构">
                    <el-select
                      v-model="fillingDetailSearchForm.fillerOrg"
                      placeholder="请选择机构"
                      style="width: 200px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="上海分行" value="上海分行"></el-option>
                      <el-option label="浦东区支行" value="浦东区支行"></el-option>
                      <el-option label="徐汇区支行" value="徐汇区支行"></el-option>
                      <el-option label="静安区支行" value="静安区支行"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item>
                    <el-button type="primary" @click="searchFillingDetail">查询</el-button>
                    <el-button @click="resetFillingDetailSearch">重置</el-button>
                  </el-form-item>
                </el-form>

                <!-- 操作按钮 -->
                <div style="margin-bottom: 20px">
                  <el-button type="warning" size="small" @click="reuploadDataMarket">
                    <i class="el-icon-upload2"></i>
                    重新上传数据集市
                  </el-button>
                </div>

                <!-- 填报数据列表 -->
                <el-table
                  :data="fillingDetailList"
                  v-loading="fillingDetailLoading"
                  border
                  stripe
                  style="width: 100%"
                  @selection-change="handleFillingDetailSelectionChange"
                >
                  <el-table-column type="selection" width="55" align="center"></el-table-column>
                  <el-table-column
                    type="index"
                    label="序号"
                    width="80"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="taskName"
                    label="任务名称"
                    width="250"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column prop="cycle" label="报表周期" width="120" align="center">
                    <template slot-scope="scope">
                      <el-tag size="mini">{{ scope.row.cycle }}</el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="dataDate"
                    label="数据日期"
                    width="140"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="fillingTime"
                    label="填报时间"
                    width="180"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="fillerName"
                    label="填报人"
                    width="120"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="fillerOrg"
                    label="填报人所在机构"
                    width="180"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column
                    prop="uploadStatus"
                    label="数据集市上传情况"
                    width="180"
                    align="center"
                  >
                    <template slot-scope="scope">
                      <el-tag :type="getUploadStatusType(scope.row.uploadStatus)" size="mini">
                        {{ scope.row.uploadStatus }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" width="120" align="center" fixed="right">
                    <template slot-scope="scope">
                      <el-button
                        v-if="scope.row.uploadStatus === '已上传'"
                        type="text"
                        size="small"
                        @click="previewFillingData(scope.row)"
                      >
                        <i class="el-icon-view"></i>
                        预览
                      </el-button>
                      <span v-else style="color: #c0c4cc">-</span>
                    </template>
                  </el-table-column>
                </el-table>

                <div style="margin-top: 20px; text-align: right">
                  <el-pagination
                    @size-change="handleFillingDetailSizeChange"
                    @current-change="handleFillingDetailCurrentChange"
                    :current-page="fillingDetailPageNum"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="fillingDetailPageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="fillingDetailTotal"
                  ></el-pagination>
                </div>
              </el-card>
            </div>

            <!-- 审计日志页面 -->
            <div id="audit-log" class="page-content">
              <el-card style="margin-bottom: 20px">
                <div slot="header" class="clearfix">
                  <span style="font-size: 18px; font-weight: bold">审计日志</span>
                </div>

                <!-- 搜索栏 -->
                <el-form
                  :inline="true"
                  :model="auditLogSearchForm"
                  class="demo-form-inline"
                  style="margin-bottom: 20px"
                >
                  <el-form-item label="时间区间">
                    <el-date-picker
                      v-model="auditLogSearchForm.timeRange"
                      type="datetimerange"
                      range-separator="至"
                      start-placeholder="开始时间"
                      end-placeholder="结束时间"
                      style="width: 300px"
                      :picker-options="{
                        shortcuts: [{
                          text: '最近一周',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                            picker.$emit('pick', [start, end]);
                          }
                        }, {
                          text: '最近一个月',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                          }
                        }, {
                          text: '最近三个月',
                          onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                          }
                        }]
                      }"
                    ></el-date-picker>
                  </el-form-item>
                  <el-form-item label="日志类型">
                    <el-select
                      v-model="auditLogSearchForm.logType"
                      placeholder="请选择日志类型"
                      style="width: 180px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="数据上传日志" value="数据上传日志"></el-option>
                      <el-option label="登录使用日志" value="登录使用日志"></el-option>
                      <el-option label="系统运行日志" value="系统运行日志"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="操作人">
                    <el-input
                      v-model="auditLogSearchForm.operator"
                      placeholder="请输入操作人姓名或工号"
                      style="width: 180px"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="所属模块">
                    <el-select
                      v-model="auditLogSearchForm.module"
                      placeholder="请选择所属模块"
                      style="width: 150px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="数据字典管理" value="数据字典管理"></el-option>
                      <el-option label="数据校验规则管理" value="数据校验规则管理"></el-option>
                      <el-option label="填报模板管理" value="填报模板管理"></el-option>
                      <el-option label="数据填报" value="数据填报"></el-option>
                      <el-option label="目标管理" value="目标管理"></el-option>
                      <el-option label="目标填报" value="目标填报"></el-option>
                      <el-option label="填报情况统计" value="填报情况统计"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="操作类型">
                    <el-select
                      v-model="auditLogSearchForm.operationType"
                      placeholder="请选择操作类型"
                      style="width: 120px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="上传" value="上传"></el-option>
                      <el-option label="下载" value="下载"></el-option>
                      <el-option label="新增" value="新增"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="是否异常">
                    <el-select
                      v-model="auditLogSearchForm.isException"
                      placeholder="请选择异常状态"
                      style="width: 120px"
                    >
                      <el-option label="全部" value=""></el-option>
                      <el-option label="正常" value="false"></el-option>
                      <el-option label="异常" value="true"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="异常栈">
                    <el-input
                      v-model="auditLogSearchForm.exceptionStack"
                      placeholder="请输入异常信息关键词"
                      style="width: 180px"
                    ></el-input>
                  </el-form-item>
                  <el-form-item>
                    <el-button type="primary" @click="searchAuditLog">查询</el-button>
                    <el-button @click="resetAuditLogSearch">重置</el-button>
                  </el-form-item>
                </el-form>

                <!-- 审计日志列表 -->
                <el-table
                  :data="auditLogList"
                  v-loading="auditLogLoading"
                  border
                  style="width: 100%"
                  @selection-change="handleAuditLogSelectionChange"
                >
                  <el-table-column type="selection" width="55" align="center"></el-table-column>
                  <el-table-column
                    type="index"
                    label="序号"
                    width="80"
                    align="center"
                  ></el-table-column>
                  <el-table-column
                    prop="time"
                    label="时间"
                    width="160"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="logType" label="日志类型" width="150" align="center">
                    <template slot-scope="scope">
                      <el-tag :type="getLogTypeTagType(scope.row.logType)" size="mini">
                        {{ scope.row.logType }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="operator"
                    label="操作人"
                    width="150"
                    align="center"
                    show-overflow-tooltip
                  ></el-table-column>
                  <el-table-column
                    prop="module"
                    label="所属模块"
                    width="150"
                    align="center"
                  ></el-table-column>
                  <el-table-column prop="operationType" label="操作类型" width="100" align="center">
                    <template slot-scope="scope">
                      <el-tag :type="getOperationTypeTagType(scope.row.operationType)" size="mini">
                        {{ scope.row.operationType }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="requestBody"
                    label="请求体"
                    width="200"
                    show-overflow-tooltip
                  >
                    <template slot-scope="scope">
                      <span style="font-family: monospace; font-size: 12px">
                        {{ scope.row.requestBody }}
                      </span>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="responseBody"
                    label="响应体"
                    width="200"
                    show-overflow-tooltip
                  >
                    <template slot-scope="scope">
                      <span style="font-family: monospace; font-size: 12px">
                        {{ scope.row.responseBody }}
                      </span>
                    </template>
                  </el-table-column>
                  <el-table-column prop="isException" label="是否异常" width="100" align="center">
                    <template slot-scope="scope">
                      <el-tag :type="scope.row.isException ? 'danger' : 'success'" size="mini">
                        {{ scope.row.isException ? '异常' : '正常' }}
                      </el-tag>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="exceptionStack"
                    label="异常栈"
                    width="200"
                    show-overflow-tooltip
                  >
                    <template slot-scope="scope">
                      <span
                        v-if="scope.row.exceptionStack"
                        style="color: #f56c6c; font-family: monospace; font-size: 12px"
                      >
                        {{ scope.row.exceptionStack }}
                      </span>
                      <span v-else style="color: #c0c4cc">-</span>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" width="120" align="center" fixed="right">
                    <template slot-scope="scope">
                      <el-button type="text" size="small" @click="viewAuditDetail(scope.row)">
                        <i class="el-icon-view"></i>
                        查看详情
                      </el-button>
                    </template>
                  </el-table-column>
                </el-table>

                <div style="margin-top: 20px; text-align: right">
                  <el-pagination
                    @size-change="handleAuditLogSizeChange"
                    @current-change="handleAuditLogCurrentChange"
                    :current-page="auditLogPageNum"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="auditLogPageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="auditLogTotal"
                  ></el-pagination>
                </div>
              </el-card>
            </div>
          </el-main>
        </el-container>
      </el-container>

      <!-- 填报模板管理 - 预览弹窗 -->
      <el-dialog
        title="模板预览"
        :visible.sync="templatePreviewDialogVisible"
        width="1400px"
        :close-on-click-modal="false"
      >
        <div style="margin-bottom: 20px">
          <el-alert title="模板预览说明" type="info" :closable="false" show-icon>
            <p>以下是当前模板的表头结构预览，与填报页面保持一致</p>
          </el-alert>
        </div>

        <!-- 预览表格 - 使用与直接填报页面相同的表头结构 -->
        <el-table
          :data="templatePreviewData"
          border
          stripe
          style="width: 100%"
          :header-cell-style="{ background: '#f5f7fa', color: '#606266', textAlign: 'center' }"
          :cell-style="{ textAlign: 'center' }"
        >
          <!-- 周计划 -->
          <el-table-column label="周计划" align="center">
            <el-table-column label="周目标" prop="weekly_target" align="center" width="120">
              <template slot-scope="scope">
                <el-input
                  v-model.number="scope.row.weekly_target"
                  type="number"
                  size="mini"
                  placeholder="请输入数值"
                  disabled
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column label="本周累计" prop="weekly_accumulated" align="center" width="120">
              <template slot-scope="scope">
                <el-input
                  v-model.number="scope.row.weekly_accumulated"
                  type="number"
                  size="mini"
                  placeholder="请输入数值"
                  disabled
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="完成率"
              prop="weekly_completion_rate"
              align="center"
              width="120"
            >
              <template slot-scope="scope">
                <el-input
                  v-model.number="scope.row.weekly_completion_rate"
                  type="number"
                  size="mini"
                  placeholder="请输入百分比"
                  disabled
                ></el-input>
              </template>
            </el-table-column>
          </el-table-column>

          <!-- 5年交长期交 -->
          <el-table-column label="5年交长期交" align="center">
            <!-- 累计 -->
            <el-table-column label="累计" align="center">
              <el-table-column label="目标" prop="cumulative_target" align="center" width="120">
                <template slot-scope="scope">
                  <el-input
                    v-model.number="scope.row.cumulative_target"
                    type="number"
                    size="mini"
                    placeholder="请输入数值"
                    disabled
                  ></el-input>
                </template>
              </el-table-column>
              <el-table-column
                label="5年交长期交保费"
                prop="cumulative_premium"
                align="center"
                width="150"
              >
                <template slot-scope="scope">
                  <el-input
                    v-model.number="scope.row.cumulative_premium"
                    type="number"
                    size="mini"
                    placeholder="请输入数值"
                    disabled
                  ></el-input>
                </template>
              </el-table-column>
              <el-table-column
                label="完成率"
                prop="cumulative_completion_rate"
                align="center"
                width="120"
              >
                <template slot-scope="scope">
                  <el-input
                    v-model.number="scope.row.cumulative_completion_rate"
                    type="number"
                    size="mini"
                    placeholder="请输入百分比"
                    disabled
                  ></el-input>
                </template>
              </el-table-column>
              <el-table-column label="排名" prop="cumulative_ranking" align="center" width="100">
                <template slot-scope="scope">
                  <el-input
                    v-model.number="scope.row.cumulative_ranking"
                    type="number"
                    size="mini"
                    placeholder="请输入排名"
                    disabled
                  ></el-input>
                </template>
              </el-table-column>
            </el-table-column>

            <!-- 其中 -->
            <el-table-column label="其中" align="center">
              <!-- 5年交终身寿险(分红险) -->
              <el-table-column label="5年交终身寿险(分红险)" align="center">
                <el-table-column label="保费" prop="whole_life_premium" align="center" width="120">
                  <template slot-scope="scope">
                    <el-input
                      v-model.number="scope.row.whole_life_premium"
                      type="number"
                      size="mini"
                      placeholder="请输入保费"
                      disabled
                    ></el-input>
                  </template>
                </el-table-column>
                <el-table-column
                  label="完成率"
                  prop="whole_life_completion_rate"
                  align="center"
                  width="120"
                >
                  <template slot-scope="scope">
                    <el-input
                      v-model.number="scope.row.whole_life_completion_rate"
                      type="number"
                      size="mini"
                      placeholder="请输入百分比"
                      disabled
                    ></el-input>
                  </template>
                </el-table-column>
              </el-table-column>

              <!-- 健康险 -->
              <el-table-column label="健康险" align="center">
                <el-table-column label="保费" prop="health_premium" align="center" width="120">
                  <template slot-scope="scope">
                    <el-input
                      v-model.number="scope.row.health_premium"
                      type="number"
                      size="mini"
                      placeholder="请输入保费"
                      disabled
                    ></el-input>
                  </template>
                </el-table-column>
                <el-table-column
                  label="完成率"
                  prop="health_completion_rate"
                  align="center"
                  width="120"
                >
                  <template slot-scope="scope">
                    <el-input
                      v-model.number="scope.row.health_completion_rate"
                      type="number"
                      size="mini"
                      placeholder="请输入百分比"
                      disabled
                    ></el-input>
                  </template>
                </el-table-column>
              </el-table-column>
            </el-table-column>
          </el-table-column>
        </el-table>

        <div slot="footer" class="dialog-footer">
          <el-button @click="templatePreviewDialogVisible = false">关闭</el-button>
        </div>
      </el-dialog>

      <!-- 填报模板管理 - 字段配置弹窗 -->
      <el-dialog
        :title="templateConfigDialogTitle"
        :visible.sync="templateConfigDialogVisible"
        width="1200px"
        :close-on-click-modal="false"
      >
        <div style="margin-bottom: 20px">
          <el-button type="primary" size="small" @click="addFieldConfig">
            <i class="el-icon-plus"></i>
            新增字段
          </el-button>
          <el-button type="info" size="small" @click="expandAllNodes">
            <i class="el-icon-arrow-down"></i>
            展开所有
          </el-button>
          <el-button type="info" size="small" @click="collapseAllNodes">
            <i class="el-icon-arrow-up"></i>
            收起所有
          </el-button>
        </div>

        <el-table
          :data="fieldConfigTreeData"
          border
          style="width: 100%"
          :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
          row-key="id"
          :default-expand-all="false"
          :expand-row-keys="expandedKeys"
        >
          <el-table-column prop="templateHeader" label="项目" width="200" show-overflow-tooltip>
            <template slot-scope="scope">
              <span v-if="scope.row.level === 1" style="font-weight: bold; color: #409eff">
                {{ scope.row.templateHeader }}
              </span>
              <span v-else-if="scope.row.level === 2" style="color: #67c23a">
                {{ scope.row.templateHeader }}
              </span>
              <span v-else>{{ scope.row.templateHeader }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="unit" label="单位" width="100" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.level >= 2">{{ scope.row.unit }}</span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="weeklyTarget" label="周目标" width="120" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.level === 2 && scope.row.templateHeader === '周目标'">
                {{ scope.row.weeklyTarget }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="weeklyAccumulated" label="本周累计" width="120" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.level === 2 && scope.row.templateHeader === '本周累计'">
                {{ scope.row.weeklyAccumulated }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="weeklyCompletionRate" label="完成率" width="120" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.level === 2 && scope.row.templateHeader === '完成率'">
                {{ scope.row.weeklyCompletionRate }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="cumulativeTarget" label="累计目标" width="120" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.level === 3 && scope.row.templateHeader === '目标'">
                {{ scope.row.cumulativeTarget }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="cumulativePremium"
            label="5年交长期交保费"
            width="150"
            align="center"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.level === 3 && scope.row.templateHeader === '5年交长期交保费'">
                {{ scope.row.cumulativePremium }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="cumulativeCompletionRate"
            label="累计完成率"
            width="120"
            align="center"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.level === 3 && scope.row.templateHeader === '完成率'">
                {{ scope.row.cumulativeCompletionRate }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="cumulativeRanking" label="排名" width="100" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.level === 3 && scope.row.templateHeader === '排名'">
                {{ scope.row.cumulativeRanking }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="wholeLifePremium" label="终身寿险保费" width="120" align="center">
            <template slot-scope="scope">
              <span
                v-if="scope.row.level === 4 && scope.row.templateHeader === '保费' && scope.row.fieldNameEn === 'whole_life_premium'"
              >
                {{ scope.row.wholeLifePremium }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="wholeLifeCompletionRate"
            label="终身寿险完成率"
            width="120"
            align="center"
          >
            <template slot-scope="scope">
              <span
                v-if="scope.row.level === 4 && scope.row.templateHeader === '完成率' && scope.row.fieldNameEn === 'whole_life_completion_rate'"
              >
                {{ scope.row.wholeLifeCompletionRate }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="healthPremium" label="健康险保费" width="120" align="center">
            <template slot-scope="scope">
              <span
                v-if="scope.row.level === 4 && scope.row.templateHeader === '保费' && scope.row.fieldNameEn === 'health_premium'"
              >
                {{ scope.row.healthPremium }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="healthCompletionRate"
            label="健康险完成率"
            width="120"
            align="center"
          >
            <template slot-scope="scope">
              <span
                v-if="scope.row.level === 4 && scope.row.templateHeader === '完成率' && scope.row.fieldNameEn === 'health_completion_rate'"
              >
                {{ scope.row.healthCompletionRate }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="fieldNameEn" label="字段英文名" width="150" show-overflow-tooltip>
            <template slot-scope="scope">
              <span v-if="scope.row.level >= 2 && scope.row.fieldNameEn">
                {{ scope.row.fieldNameEn }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="fieldRemark" label="字段备注" width="120" show-overflow-tooltip>
            <template slot-scope="scope">
              <span v-if="scope.row.level >= 2 && scope.row.fieldRemark">
                {{ scope.row.fieldRemark }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="fieldType" label="字段类型" width="100" align="center">
            <template slot-scope="scope">
              <el-tag v-if="scope.row.level >= 2 && scope.row.fieldType" size="mini">
                {{ scope.row.fieldType }}
              </el-tag>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="length" label="长度" width="80" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.level >= 2 && scope.row.length">{{ scope.row.length }}</span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="validationRules"
            label="校验规则编码"
            width="120"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
              <div
                v-if="scope.row.level >= 2 && scope.row.validationRules && scope.row.validationRules.length > 0"
              >
                <el-tag
                  v-for="rule in scope.row.validationRules"
                  :key="rule"
                  size="mini"
                  style="margin-right: 4px"
                >
                  {{ rule }}
                </el-tag>
              </div>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="validationRuleNames"
            label="校验规则名称"
            width="120"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
              <div
                v-if="scope.row.level >= 2 && scope.row.validationRuleNames && scope.row.validationRuleNames.length > 0"
              >
                <el-tag
                  v-for="name in scope.row.validationRuleNames"
                  :key="name"
                  size="mini"
                  type="info"
                  style="margin-right: 4px"
                >
                  {{ name }}
                </el-tag>
              </div>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="customRegex" label="自定义正则" width="120" show-overflow-tooltip>
            <template slot-scope="scope">
              <span v-if="scope.row.level >= 2 && scope.row.customRegex">
                {{ scope.row.customRegex }}
              </span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="dataDictionary" label="数据字典" width="100" align="center">
            <template slot-scope="scope">
              <el-tag
                v-if="scope.row.level >= 2 && scope.row.dataDictionary"
                size="mini"
                type="warning"
              >
                {{ scope.row.dataDictionary }}
              </el-tag>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column prop="remark" label="备注" width="120" show-overflow-tooltip>
            <template slot-scope="scope">
              <span v-if="scope.row.level >= 2 && scope.row.remark">{{ scope.row.remark }}</span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" width="250" align="center" fixed="right">
            <template slot-scope="scope">
              <!-- 新增子字段按钮 - 所有级别都显示 -->
              <el-button
                type="text"
                size="small"
                style="color: #409eff"
                @click="addChildField(scope.row)"
              >
                <i class="el-icon-plus"></i>
                新增子字段
              </el-button>

              <!-- 编辑按钮 - 只有最末级（没有子节点的节点）显示 -->
              <el-button
                v-if="!scope.row.children || scope.row.children.length === 0"
                type="text"
                size="small"
                @click="editFieldConfig(scope.row)"
              >
                编辑
              </el-button>

              <!-- 重命名按钮 - 只有非最末级（有子节点的节点）显示 -->
              <el-button
                v-if="scope.row.children && scope.row.children.length > 0"
                type="text"
                size="small"
                style="color: #67c23a"
                @click="renameField(scope.row)"
              >
                重命名
              </el-button>

              <!-- 删除按钮 - 所有级别都显示 -->
              <el-button
                type="text"
                size="small"
                style="color: #f56c6c"
                @click="deleteFieldConfig(scope.row)"
              >
                删除
              </el-button>
            </template>
          </el-table-column>
        </el-table>

        <div slot="footer" class="dialog-footer">
          <el-button @click="templateConfigDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="saveFieldConfig">保存配置</el-button>
        </div>
      </el-dialog>

      <!-- 目标管理 - 新增/编辑弹窗 -->
      <el-dialog
        :title="targetDialogTitle"
        :visible.sync="targetDialogVisible"
        width="600px"
        :close-on-click-modal="false"
      >
        <el-form :model="targetForm" :rules="targetRules" ref="targetForm" label-width="120px">
          <el-form-item label="目标名称" prop="targetName">
            <el-input v-model="targetForm.targetName" placeholder="请输入目标名称"></el-input>
          </el-form-item>
          <el-form-item label="业务线" prop="businessLine">
            <el-select
              v-model="targetForm.businessLine"
              placeholder="请选择业务线"
              style="width: 100%"
            >
              <el-option label="个人金融" value="个人金融"></el-option>
              <el-option label="公司金融" value="公司金融"></el-option>
              <el-option label="金融市场" value="金融市场"></el-option>
              <el-option label="投资银行" value="投资银行"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="目标周期" prop="targetCycle">
            <el-select
              v-model="targetForm.targetCycle"
              placeholder="请选择目标周期"
              style="width: 100%"
            >
              <el-option label="月度" value="月度"></el-option>
              <el-option label="季度" value="季度"></el-option>
              <el-option label="年度" value="年度"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="目标年度" prop="targetYear">
            <el-input-number
              v-model="targetForm.targetYear"
              :min="2020"
              :max="2030"
              style="width: 100%"
            ></el-input-number>
          </el-form-item>
          <el-form-item label="目标时间范围" prop="targetTimeRange">
            <el-date-picker
              v-model="targetForm.targetTimeRange"
              type="daterange"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="单位" prop="unit">
            <el-select v-model="targetForm.unit" placeholder="请选择单位" style="width: 100%">
              <el-option label="万元" value="万元"></el-option>
              <el-option label="亿元" value="亿元"></el-option>
              <el-option label="笔" value="笔"></el-option>
              <el-option label="户" value="户"></el-option>
              <el-option label="%" value="%"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="填写提示" prop="fillingTips">
            <el-input
              type="textarea"
              v-model="targetForm.fillingTips"
              placeholder="请输入填写提示信息"
              :rows="3"
            ></el-input>
          </el-form-item>
          <el-form-item label="填写提示图" prop="fillingTipsImage">
            <el-upload
              class="upload-demo"
              action="#"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :before-upload="beforeUpload"
              :file-list="targetForm.fillingTipsImageList"
              list-type="picture"
            >
              <el-button size="small" type="primary">点击上传</el-button>
              <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过2MB</div>
            </el-upload>
          </el-form-item>
          <el-form-item label="启用状态" prop="status">
            <el-radio-group v-model="targetForm.status">
              <el-radio label="启用">启用</el-radio>
              <el-radio label="停用">停用</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-form>

        <div slot="footer" class="dialog-footer">
          <el-button @click="targetDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleTargetSubmit">确定</el-button>
        </div>
      </el-dialog>

      <!-- 目标值分配 - 开始分配弹窗 -->
      <el-dialog
        :title="targetFillingDialogTitle"
        :visible.sync="targetFillingDialogVisible"
        :width="'1100px'"
        :close-on-click-modal="false"
      >
        <div style="display: flex; gap: 20px">
          <!-- 左侧：分配值填写表格 -->
          <div style="flex-shrink: 0">
            <!-- 目标值分配表格 -->
            <el-table
              :data="targetFillingTreeData"
              border
              style="table-layout: fixed; max-width: 800px"
              :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
              row-key="id"
              :default-expand-all="true"
            >
              <el-table-column prop="orgName" label="机构名称" width="180" show-overflow-tooltip>
                <template slot-scope="scope">
                  <span v-if="scope.row.level === 1" style="font-weight: bold; color: #409eff">
                    {{ scope.row.orgName }}
                  </span>
                  <span v-else-if="scope.row.level === 2" style="color: #67c23a">
                    {{ scope.row.orgName }}
                  </span>
                  <span v-else>{{ scope.row.orgName }}</span>
                </template>
              </el-table-column>
              <el-table-column
                prop="orgCode"
                label="机构代码"
                width="100"
                align="center"
              ></el-table-column>
              <el-table-column prop="unit" label="单位" width="60" align="center"></el-table-column>
              <el-table-column prop="allocatedValue" label="分配值" width="140" align="right">
                <template slot-scope="scope">
                  <el-input
                    v-if="scope.row.level === 3"
                    v-model="scope.row.allocatedValue"
                    placeholder="请输入分配值"
                    size="small"
                    type="number"
                  ></el-input>
                  <span v-else style="color: #67c23a; font-weight: bold">
                    {{ scope.row.allocatedValue }}
                  </span>
                </template>
              </el-table-column>
              <el-table-column prop="remark" label="备注" width="200" show-overflow-tooltip>
                <template slot-scope="scope">
                  <el-input
                    v-if="scope.row.level === 3"
                    v-model="scope.row.remark"
                    placeholder="请输入备注"
                    size="small"
                  ></el-input>
                  <span v-else style="color: #c0c4cc">-</span>
                </template>
              </el-table-column>
            </el-table>
          </div>

          <!-- 右侧：填写提示区域 -->
          <div
            style="
              width: 350px;
              flex-shrink: 0;
              background-color: #f5f7fa;
              padding: 20px 20px 20px 20px;
              border-radius: 4px;
              height: fit-content;
              box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            "
          >
            <h4 style="margin-top: 0; color: #303133; margin-bottom: 12px; font-size: 16px">
              填写提示
            </h4>
            <div style="color: #606266; line-height: 1.5; margin-bottom: 16px; font-size: 13px">
              <p style="margin: 0 0 8px 0">• 请根据各机构实际情况填写分配值</p>
              <p style="margin: 0 0 8px 0">• 分配值应为正数，支持小数点后两位</p>
              <p style="margin: 0 0 8px 0">• 可在备注中说明分配依据或特殊情况</p>
            </div>

            <!-- 填写示例 -->
            <div style="margin-top: 16px">
              <h5 style="margin: 0 0 8px 0; color: #303133; font-size: 14px">填写示例</h5>
              <div
                style="
                  border: 1px solid #dcdfe6;
                  border-radius: 4px;
                  padding: 10px;
                  background-color: #fff;
                  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
                "
              >
                <!-- 模拟表格行 -->
                <div
                  style="
                    display: flex;
                    align-items: center;
                    padding: 6px 0;
                    border-bottom: 1px solid #f0f0f0;
                  "
                >
                  <div style="width: 120px; font-size: 12px; color: #909399">机构名称</div>
                  <div style="width: 80px; font-size: 12px; color: #909399">机构代码</div>
                  <div style="width: 50px; font-size: 12px; color: #909399">单位</div>
                  <div style="width: 80px; font-size: 12px; color: #909399">分配值</div>
                  <div style="font-size: 12px; color: #909399">备注</div>
                </div>
                <div style="display: flex; align-items: center; padding: 8px 0">
                  <div style="width: 120px; font-size: 12px; color: #303133">陆家嘴分理处</div>
                  <div style="width: 80px; font-size: 12px; color: #303133">310001001</div>
                  <div style="width: 50px; font-size: 12px; color: #303133">户</div>
                  <div style="width: 80px">
                    <input
                      type="number"
                      value="10"
                      style="
                        width: 70px;
                        height: 24px;
                        border: 1px solid #409eff;
                        border-radius: 2px;
                        padding: 0 6px;
                        font-size: 12px;
                        background-color: #f0f9ff;
                      "
                      readonly
                    />
                  </div>
                  <div>
                    <input
                      type="text"
                      placeholder="请输入备注"
                      style="
                        width: 100px;
                        height: 24px;
                        border: 1px solid #dcdfe6;
                        border-radius: 2px;
                        padding: 0 6px;
                        font-size: 12px;
                      "
                      readonly
                    />
                  </div>
                </div>
                <div
                  style="
                    margin-top: 8px;
                    padding: 6px;
                    background-color: #f0f9ff;
                    border-radius: 2px;
                    border-left: 3px solid #409eff;
                  "
                >
                  <span style="font-size: 11px; color: #409eff">
                    💡 只有第三级机构可以编辑分配值和备注
                  </span>
                </div>
              </div>
            </div>
          </div>
        </div>

        <div slot="footer" class="dialog-footer">
          <el-button @click="targetFillingDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="saveTargetFilling">保存</el-button>
        </div>
      </el-dialog>

      <!-- 目标值分配 - 查看详情弹窗 -->
      <el-dialog
        :title="targetFillingDetailDialogTitle"
        :visible.sync="targetFillingDetailDialogVisible"
        width="1000px"
        :close-on-click-modal="false"
      >
        <el-table
          :data="targetFillingDetailTreeData"
          border
          style="width: 100%"
          :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
          row-key="id"
          :default-expand-all="true"
        >
          <el-table-column prop="orgName" label="机构名称" width="200" show-overflow-tooltip>
            <template slot-scope="scope">
              <span v-if="scope.row.level === 1" style="font-weight: bold; color: #409eff">
                {{ scope.row.orgName }}
              </span>
              <span v-else-if="scope.row.level === 2" style="color: #67c23a">
                {{ scope.row.orgName }}
              </span>
              <span v-else>{{ scope.row.orgName }}</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="orgCode"
            label="机构代码"
            width="120"
            align="center"
          ></el-table-column>
          <el-table-column prop="unit" label="单位" width="80" align="center"></el-table-column>
          <el-table-column prop="allocatedValue" label="分配值" width="120" align="right">
            <template slot-scope="scope">
              <span style="color: #67c23a; font-weight: bold">{{ scope.row.allocatedValue }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip>
            <template slot-scope="scope">
              <span v-if="scope.row.level === 3">{{ scope.row.remark || '-' }}</span>
              <span v-else style="color: #c0c4cc">-</span>
            </template>
          </el-table-column>
        </el-table>

        <div slot="footer" class="dialog-footer">
          <el-button @click="targetFillingDetailDialogVisible = false">关闭</el-button>
        </div>
      </el-dialog>

      <!-- 填报明细 - 数据预览弹窗 -->
      <el-dialog
        title="数据预览"
        :visible.sync="fillingDataPreviewDialogVisible"
        width="800px"
        :close-on-click-modal="false"
      >
        <div style="margin-bottom: 20px">
          <el-row :gutter="20">
            <el-col :span="12">
              <div>
                <strong>任务名称：</strong>
                {{ previewData.taskName }}
              </div>
            </el-col>
            <el-col :span="12">
              <div>
                <strong>数据日期：</strong>
                {{ previewData.dataDate }}
              </div>
            </el-col>
          </el-row>
          <el-row :gutter="20" style="margin-top: 10px">
            <el-col :span="12">
              <div>
                <strong>填报人：</strong>
                {{ previewData.fillerName }}
              </div>
            </el-col>
            <el-col :span="12">
              <div>
                <strong>填报机构：</strong>
                {{ previewData.fillerOrg }}
              </div>
            </el-col>
          </el-row>
        </div>

        <el-table :data="previewData.dataContent" border style="width: 100%">
          <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
          <el-table-column
            prop="fieldName"
            label="字段名称"
            width="150"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="fieldValue"
            label="字段值"
            width="200"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="fieldType"
            label="字段类型"
            width="100"
            align="center"
          ></el-table-column>
          <el-table-column prop="remark" label="备注" show-overflow-tooltip></el-table-column>
        </el-table>

        <div slot="footer" class="dialog-footer">
          <el-button @click="fillingDataPreviewDialogVisible = false">关闭</el-button>
        </div>
      </el-dialog>

      <!-- 数据字典管理 - 新增/编辑弹窗 -->
      <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px">
        <el-form :model="dictForm" :rules="dictRules" ref="dictForm" label-width="120px">
          <el-form-item label="字典类型编码" prop="dictTypeCode">
            <el-input v-model="dictForm.dictTypeCode" placeholder="请输入字典类型编码"></el-input>
          </el-form-item>
          <el-form-item label="字典类型名称" prop="dictTypeName">
            <el-input v-model="dictForm.dictTypeName" placeholder="请输入字典类型名称"></el-input>
          </el-form-item>
          <el-form-item label="字典项编码" prop="dictItemCode">
            <el-input v-model="dictForm.dictItemCode" placeholder="请输入字典项编码"></el-input>
          </el-form-item>
          <el-form-item label="字典项名称" prop="dictItemName">
            <el-input v-model="dictForm.dictItemName" placeholder="请输入字典项名称"></el-input>
          </el-form-item>
          <el-form-item label="序号" prop="sortOrder">
            <el-input-number v-model="dictForm.sortOrder" :min="1" :max="999"></el-input-number>
          </el-form-item>
          <el-form-item label="状态" prop="status">
            <el-select v-model="dictForm.status" placeholder="请选择状态">
              <el-option label="启用" value="启用"></el-option>
              <el-option label="停用" value="停用"></el-option>
            </el-select>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleSubmit">确定</el-button>
        </div>
      </el-dialog>

      <!-- 数据校验规则管理 - 新增/编辑弹窗 -->
      <el-dialog :title="ruleDialogTitle" :visible.sync="ruleDialogVisible" width="800px">
        <el-form :model="ruleForm" :rules="ruleRules" ref="ruleForm" label-width="140px">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="校验规则编码" prop="ruleCode">
                <el-input v-model="ruleForm.ruleCode" placeholder="请输入校验规则编码"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="校验规则名称" prop="ruleName">
                <el-input v-model="ruleForm.ruleName" placeholder="请输入校验规则名称"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="校验方式" prop="validationType">
                <el-select
                  v-model="ruleForm.validationType"
                  placeholder="请选择校验方式"
                  style="width: 100%"
                >
                  <el-option label="正则表达式" value="regex"></el-option>
                  <el-option label="自定义方法" value="custom"></el-option>
                  <el-option label="数值范围" value="range"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="BeanId" prop="beanId">
                <el-input v-model="ruleForm.beanId" placeholder="请输入BeanId"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="表达式/脚本" prop="expression">
            <el-input
              v-model="ruleForm.expression"
              type="textarea"
              :rows="4"
              placeholder="请输入正则表达式、脚本或数值范围"
            ></el-input>
          </el-form-item>
          <el-form-item label="备注" prop="remark">
            <el-input
              v-model="ruleForm.remark"
              type="textarea"
              :rows="2"
              placeholder="请输入备注信息"
            ></el-input>
          </el-form-item>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="状态" prop="status">
                <el-select v-model="ruleForm.status" placeholder="请选择状态" style="width: 100%">
                  <el-option label="启用" value="启用"></el-option>
                  <el-option label="停用" value="停用"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="序号" prop="sequence">
                <el-input-number
                  v-model="ruleForm.sequence"
                  :min="1"
                  :max="999"
                  style="width: 100%"
                ></el-input-number>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="ruleDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleRuleSubmit">确定</el-button>
        </div>
      </el-dialog>

      <!-- 测试校验规则弹窗 -->
      <el-dialog :title="testRuleDialogTitle" :visible.sync="testRuleDialogVisible" width="600px">
        <div v-if="currentTestRule">
          <el-card class="box-card" style="margin-bottom: 20px">
            <div slot="header" class="clearfix">
              <span style="font-weight: 600">规则信息</span>
            </div>
            <el-descriptions :column="2" border>
              <el-descriptions-item label="规则编码">
                {{ currentTestRule.ruleCode }}
              </el-descriptions-item>
              <el-descriptions-item label="规则名称">
                {{ currentTestRule.ruleName }}
              </el-descriptions-item>
              <el-descriptions-item label="校验方式">
                <el-tag :type="getValidationTypeTag(currentTestRule.validationType)" size="small">
                  {{ getValidationTypeText(currentTestRule.validationType) }}
                </el-tag>
              </el-descriptions-item>
              <el-descriptions-item label="BeanId">
                {{ currentTestRule.beanId }}
              </el-descriptions-item>
              <el-descriptions-item label="表达式/脚本" :span="2">
                <el-input
                  v-model="currentTestRule.expression"
                  type="textarea"
                  :rows="3"
                  readonly
                  style="font-family: monospace"
                ></el-input>
              </el-descriptions-item>
            </el-descriptions>
          </el-card>

          <el-card class="box-card">
            <div slot="header" class="clearfix">
              <span style="font-weight: 600">测试输入</span>
            </div>
            <el-form :model="testRuleForm" label-width="100px">
              <el-form-item label="测试值">
                <el-input
                  v-model="testRuleForm.testValue"
                  placeholder="请输入要测试的值"
                  clearable
                ></el-input>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="executeTest" :loading="testRuleForm.testing">
                  <i class="el-icon-search"></i>
                  执行校验
                </el-button>
                <el-button @click="clearTestResult">清空结果</el-button>
              </el-form-item>
            </el-form>

            <!-- 测试结果 -->
            <div v-if="testRuleForm.testResult" style="margin-top: 20px">
              <el-divider content-position="left">校验结果</el-divider>
              <el-alert
                :title="testRuleForm.testMessage"
                :type="testRuleForm.isValid ? 'success' : 'error'"
                :description="testRuleForm.testResult"
                show-icon
                :closable="false"
              ></el-alert>
            </div>
          </el-card>
        </div>
        <div slot="footer" class="dialog-footer">
          <el-button @click="testRuleDialogVisible = false">关闭</el-button>
        </div>
      </el-dialog>

      <!-- 填报详情弹窗 -->
      <el-dialog
        title="填报详情 - 银行业金融机构案防情况统计表"
        :visible.sync="inlineEditDialogVisible"
        width="1400px"
        :close-on-click-modal="false"
        top="5vh"
      >
        <el-table
          :data="inlineEditData"
          border
          style="width: 100%"
          :header-cell-style="{ background: '#f5f7fa', color: '#606266', fontWeight: 'bold' }"
          :span-method="inlineEditSpanMethod"
        >
          <el-table-column prop="category" label="项目类别" width="200" fixed="left">
            <template slot-scope="scope">
              <div
                v-if="scope.row.level === 1"
                style="
                  font-weight: bold;
                  color: #409eff;
                  display: flex;
                  align-items: center;
                  justify-content: flex-start;
                  height: 100%;
                  padding-left: 8px;
                "
              >
                {{ scope.row.category }}
              </div>
              <div
                v-else
                style="
                  color: #666;
                  display: flex;
                  align-items: center;
                  justify-content: flex-start;
                  height: 100%;
                  padding-left: 8px;
                "
              >
                {{ scope.row.category }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="item" label="项目" width="300">
            <template slot-scope="scope">
              <div
                v-if="scope.row.level === 1"
                style="font-weight: bold; color: #333; padding-left: 8px"
              >
                {{ scope.row.item }}
              </div>
              <div v-else-if="scope.row.level === 2" style="color: #333; padding-left: 8px">
                {{ scope.row.item }}
              </div>
              <div v-else style="color: #333; padding-left: 8px">{{ scope.row.item }}</div>
            </template>
          </el-table-column>
          <el-table-column prop="unit" label="单位" width="80" align="center">
            <template slot-scope="scope">
              <span>{{ scope.row.unit || '人' }}</span>
            </template>
          </el-table-column>
          <el-table-column label="当季度新增数" width="150" align="center">
            <template slot-scope="scope">
              <el-input-number
                v-if="scope.row.editing && scope.row.editingField === 'newAdditions'"
                v-model="scope.row.newAdditions"
                :min="0"
                :max="9999"
                size="mini"
                style="width: 100px"
                @blur="finishEdit(scope.row, 'newAdditions')"
                @keyup.enter.native="finishEdit(scope.row, 'newAdditions')"
                @keyup.esc.native="cancelEdit(scope.row, 'newAdditions')"
                ref="editInput"
              ></el-input-number>
              <span
                v-else
                @dblclick="startEdit(scope.row, 'newAdditions')"
                style="cursor: pointer; padding: 4px 8px; border-radius: 2px"
                :style="{ backgroundColor: scope.row.newAdditions !== null ? '#e6f7ff' : '#f5f5f5' }"
              >
                {{ scope.row.newAdditions !== null ? scope.row.newAdditions : '点击编辑' }}
              </span>
            </template>
          </el-table-column>
          <el-table-column
            label="当季新增数中与当年内前期已报送数据的重复数"
            width="200"
            align="center"
          >
            <template slot-scope="scope">
              <div v-if="scope.row.allowDuplicate">
                <el-input-number
                  v-if="scope.row.editing && scope.row.editingField === 'duplicates'"
                  v-model="scope.row.duplicates"
                  :min="0"
                  :max="scope.row.newAdditions"
                  size="mini"
                  style="width: 100px"
                  @blur="finishEdit(scope.row, 'duplicates')"
                  @keyup.enter.native="finishEdit(scope.row, 'duplicates')"
                  @keyup.esc.native="cancelEdit(scope.row, 'duplicates')"
                ></el-input-number>
                <span
                  v-else
                  @dblclick="startEdit(scope.row, 'duplicates')"
                  style="cursor: pointer; padding: 4px 8px; border-radius: 2px"
                  :style="{ backgroundColor: scope.row.duplicates !== null ? '#e6f7ff' : '#f5f5f5' }"
                >
                  {{ scope.row.duplicates !== null ? scope.row.duplicates : '点击编辑' }}
                </span>
              </div>
              <span v-else>0</span>
            </template>
          </el-table-column>
          <el-table-column label="截至本季度末累计总数" width="150" align="center">
            <template slot-scope="scope">
              <!-- 特定字段显示"系统计算" -->
              <span
                v-if="[2, 3, 4, 5, 6].includes(scope.row.id)"
                style="color: #909399; font-style: italic; padding: 4px 8px"
              >
                系统计算
              </span>
              <!-- 其他字段保持可编辑 -->
              <template v-else>
                <el-input-number
                  v-if="scope.row.editing && scope.row.editingField === 'cumulativeTotal'"
                  v-model="scope.row.cumulativeTotal"
                  :min="0"
                  :max="99999"
                  size="mini"
                  style="width: 100px"
                  @blur="finishEdit(scope.row, 'cumulativeTotal')"
                  @keyup.enter.native="finishEdit(scope.row, 'cumulativeTotal')"
                  @keyup.esc.native="cancelEdit(scope.row, 'cumulativeTotal')"
                ></el-input-number>
                <span
                  v-else
                  @dblclick="startEdit(scope.row, 'cumulativeTotal')"
                  style="cursor: pointer; padding: 4px 8px; border-radius: 2px"
                  :style="{ backgroundColor: scope.row.cumulativeTotal !== null ? '#e6f7ff' : '#f5f5f5' }"
                >
                  {{ scope.row.cumulativeTotal !== null ? scope.row.cumulativeTotal : '点击编辑' }}
                </span>
              </template>
            </template>
          </el-table-column>
        </el-table>

        <div slot="footer" class="dialog-footer">
          <el-button @click="inlineEditDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="saveInlineEdit">保存</el-button>
          <el-button type="success" @click="submitInlineEdit">保存并提交</el-button>
        </div>
      </el-dialog>

      <!-- 数据上传弹窗 -->
      <el-dialog
        title="数据上传"
        :visible.sync="dataUploadDialogVisible"
        width="600px"
        :close-on-click-modal="false"
      >
        <div style="margin-bottom: 20px">
          <h4 style="color: #409eff; margin-bottom: 15px">
            <i class="el-icon-download"></i>
            模板下载
          </h4>
          <p style="color: #666; margin-bottom: 15px">
            请先下载标准模板，按照模板格式填写数据后再上传
          </p>
          <el-button type="primary" @click="downloadExcelTemplate" style="width: 200px">
            <i class="el-icon-download"></i>
            下载Excel模板
          </el-button>
        </div>

        <el-divider></el-divider>

        <div>
          <h4 style="color: #409eff; margin-bottom: 15px">
            <i class="el-icon-upload"></i>
            文件上传
          </h4>
          <el-upload
            ref="upload"
            :action="uploadAction"
            :headers="uploadHeaders"
            :data="uploadData"
            :file-list="fileList"
            :before-upload="beforeUpload"
            :on-success="handleUploadSuccess"
            :on-error="handleUploadError"
            :on-remove="handleRemove"
            :auto-upload="false"
            accept=".xlsx,.xls"
            drag
          >
            <i class="el-icon-upload"></i>
            <div class="el-upload__text">
              将文件拖到此处，或
              <em>点击上传</em>
            </div>
            <div class="el-upload__tip" slot="tip">只能上传xlsx/xls文件，且不超过10MB</div>
          </el-upload>
        </div>

        <div slot="footer" class="dialog-footer">
          <el-button @click="dataUploadDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="submitUpload" :loading="uploadLoading">
            确认上传
          </el-button>
        </div>
      </el-dialog>

      <!-- 填报模板管理 - 新增/编辑弹窗 -->
      <el-dialog :title="templateDialogTitle" :visible.sync="templateDialogVisible" width="900px">
        <el-form
          :model="templateForm"
          :rules="templateRules"
          ref="templateForm"
          label-width="140px"
        >
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="报表名称" prop="reportName">
                <el-input v-model="templateForm.reportName" placeholder="请输入报表名称"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="映射表英文名" prop="tableNameEn">
                <el-input
                  v-model="templateForm.tableNameEn"
                  placeholder="请输入映射表英文名"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="映射表中文名" prop="tableNameCn">
                <el-input
                  v-model="templateForm.tableNameCn"
                  placeholder="请输入映射表中文名"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="使用条线" prop="businessLine">
                <el-select
                  v-model="templateForm.businessLine"
                  placeholder="请选择使用条线"
                  style="width: 100%"
                >
                  <el-option label="公司金融" value="corporate"></el-option>
                  <el-option label="零售金融" value="retail"></el-option>
                  <el-option label="金融市场" value="market"></el-option>
                  <el-option label="风险管理" value="risk"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="填报周期" prop="cycle">
                <el-select
                  v-model="templateForm.cycle"
                  placeholder="请选择填报周期"
                  style="width: 100%"
                >
                  <el-option label="日" value="daily"></el-option>
                  <el-option label="周" value="weekly"></el-option>
                  <el-option label="月" value="monthly"></el-option>
                  <el-option label="季" value="quarterly"></el-option>
                  <el-option label="年" value="yearly"></el-option>
                  <el-option label="不定期" value="irregular"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="填报层级" prop="fillingLevel">
                <el-select
                  v-model="templateForm.fillingLevel"
                  placeholder="请选择填报层级"
                  style="width: 100%"
                >
                  <el-option label="总行" value="总行"></el-option>
                  <el-option label="分行" value="分行"></el-option>
                  <el-option label="区支行" value="区支行"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="是否有目标值" prop="hasTarget">
                <el-radio-group v-model="templateForm.hasTarget">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="启用状态" prop="status">
                <el-select
                  v-model="templateForm.status"
                  placeholder="请选择启用状态"
                  style="width: 100%"
                >
                  <el-option label="启用" value="启用"></el-option>
                  <el-option label="停用" value="停用"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="业务类型" prop="businessType">
                <el-select
                  v-model="templateForm.businessType"
                  placeholder="请选择业务类型"
                  style="width: 100%"
                >
                  <el-option label="业务经营类" value="business"></el-option>
                  <el-option label="内部管理类" value="management"></el-option>
                  <el-option label="考勤绩效类" value="attendance"></el-option>
                  <el-option label="风险合规类" value="compliance"></el-option>
                  <el-option label="财务会计类" value="finance"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="导入起始行" prop="importStartRow">
                <el-input-number
                  v-model="templateForm.importStartRow"
                  :min="1"
                  :max="1000"
                  placeholder="请输入导入起始行"
                  style="width: 100%"
                ></el-input-number>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20" v-if="templateForm.cycle === 'irregular'">
            <el-col :span="12">
              <el-form-item label="数据日期" prop="dataDate">
                <el-date-picker
                  v-model="templateForm.dataDate"
                  type="date"
                  placeholder="请选择数据日期"
                  style="width: 100%"
                ></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="是否上送数据集市" prop="sendToDataMarket">
                <el-radio-group v-model="templateForm.sendToDataMarket">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20" v-else>
            <el-col :span="12">
              <el-form-item label="是否上送数据集市" prop="sendToDataMarket">
                <el-radio-group v-model="templateForm.sendToDataMarket">
                  <el-radio :label="true">是</el-radio>
                  <el-radio :label="false">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <!-- 占位列 -->
            </el-col>
          </el-row>
          <el-form-item label="上传模板" prop="templateFile">
            <el-upload
              class="upload-demo"
              drag
              action="#"
              :auto-upload="false"
              :on-change="handleTemplateFileChange"
              :file-list="templateFileList"
              accept=".xlsx,.xls"
            >
              <i class="el-icon-upload"></i>
              <div class="el-upload__text">
                将文件拖到此处，或
                <em>点击上传</em>
              </div>
              <div class="el-upload__tip" slot="tip">只能上传xlsx/xls文件</div>
            </el-upload>
          </el-form-item>
          <el-form-item label="用途介绍" prop="purpose">
            <el-input
              v-model="templateForm.purpose"
              type="textarea"
              :rows="3"
              placeholder="请输入用途介绍"
            ></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="templateDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleTemplateSubmit">确定</el-button>
        </div>
      </el-dialog>

      <!-- 案防统计管理 - 新增/编辑弹窗 -->
      <el-dialog
        :title="casePreventionDialogTitle"
        :visible.sync="casePreventionDialogVisible"
        width="600px"
        :close-on-click-modal="false"
      >
        <el-form
          :model="casePreventionForm"
          :rules="casePreventionRules"
          ref="casePreventionForm"
          label-width="120px"
        >
          <el-form-item
            v-if="casePreventionForm.type === 'project'"
            label="所属项目类型"
            prop="parentId"
          >
            <el-select
              v-model="casePreventionForm.parentId"
              placeholder="请选择项目类型"
              style="width: 100%"
            >
              <el-option
                v-for="item in projectTypeOptions"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="名称" prop="name">
            <el-input v-model="casePreventionForm.name" placeholder="请输入名称"></el-input>
          </el-form-item>
          <el-form-item label="编码" prop="code">
            <el-input v-model="casePreventionForm.code" placeholder="请输入编码"></el-input>
          </el-form-item>
          <el-form-item label="描述" prop="description">
            <el-input
              type="textarea"
              v-model="casePreventionForm.description"
              placeholder="请输入描述"
              :rows="3"
            ></el-input>
          </el-form-item>
          <el-form-item label="填报条线" prop="fillingLine">
            <el-select
              v-model="casePreventionForm.fillingLine"
              placeholder="请选择填报条线"
              style="width: 100%"
            >
              <el-option
                v-for="item in fillingLineOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item v-if="casePreventionForm.type === 'project'" label="单位" prop="unit">
            <el-input
              v-model="casePreventionForm.unit"
              placeholder="请输入单位，如：人、万元等"
            ></el-input>
          </el-form-item>
          <el-form-item
            v-if="casePreventionForm.type === 'project'"
            label="填报口径说明"
            prop="reportingScope"
          >
            <el-input
              type="textarea"
              v-model="casePreventionForm.reportingScope"
              placeholder="请输入填报口径说明"
              :rows="3"
            ></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="casePreventionDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleCasePreventionSubmit">确定</el-button>
        </div>
      </el-dialog>

      <!-- 新建版本弹窗 -->
      <el-dialog
        title="新建版本"
        :visible.sync="newVersionDialogVisible"
        width="500px"
        :close-on-click-modal="false"
      >
        <el-form
          :model="newVersionForm"
          :rules="newVersionRules"
          ref="newVersionForm"
          label-width="100px"
        >
          <el-form-item label="版本名称" prop="name">
            <el-input
              v-model="newVersionForm.name"
              placeholder="请输入版本名称，如：2024年Q4案防统计"
            ></el-input>
          </el-form-item>
          <el-form-item label="创建方式" prop="createType">
            <el-radio-group v-model="newVersionForm.createType" @change="handleCreateTypeChange">
              <el-radio label="blank">空白版本（从零开始）</el-radio>
              <el-radio label="copy">复制已有版本</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item
            v-if="newVersionForm.createType === 'copy'"
            label="源版本"
            prop="sourceVersionId"
          >
            <el-select
              v-model="newVersionForm.sourceVersionId"
              placeholder="请选择要复制的版本"
              style="width: 100%"
            >
              <el-option
                v-for="version in versionList"
                :key="version.id"
                :label="version.name"
                :value="version.id"
              >
                <span style="float: left">{{ version.name }}</span>
                <span style="float: right; color: #8492a6; font-size: 13px">
                  {{ version.quarter }}
                </span>
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="版本描述" prop="description">
            <el-input
              type="textarea"
              v-model="newVersionForm.description"
              placeholder="请输入版本描述（可选）"
              :rows="3"
            ></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="newVersionDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleNewVersionSubmit">确定</el-button>
        </div>
      </el-dialog>
    </div>

    <!-- Scripts -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script>
      new Vue({
        el: '#app',
        data() {
          return {
            loading: false,
            pageNum: 1,
            pageSize: 10,
            total: 0,
            searchForm: {
              dictTypeCode: '',
              dictTypeName: '',
            },
            dictList: [
              // 性别字典
              {
                dictTypeCode: 'GENDER',
                dictTypeName: '性别',
                dictItemCode: '0',
                dictItemName: '男',
                sortOrder: 1,
                status: '启用',
                maintainerName: '张三',
                maintainerId: '12345678',
                maintainTime: '2024-01-15 10:30:00',
              },
              {
                dictTypeCode: 'GENDER',
                dictTypeName: '性别',
                dictItemCode: '1',
                dictItemName: '女',
                sortOrder: 2,
                status: '启用',
                maintainerName: '张三',
                maintainerId: '12345678',
                maintainTime: '2024-01-15 10:30:00',
              },
              // 客户类型字典
              {
                dictTypeCode: 'CUST_TYPE',
                dictTypeName: '客户类型',
                dictItemCode: '01',
                dictItemName: '个人客户',
                sortOrder: 1,
                status: '启用',
                maintainerName: '李四',
                maintainerId: '87654321',
                maintainTime: '2024-01-16 14:20:00',
              },
              {
                dictTypeCode: 'CUST_TYPE',
                dictTypeName: '客户类型',
                dictItemCode: '02',
                dictItemName: '企业客户',
                sortOrder: 2,
                status: '启用',
                maintainerName: '李四',
                maintainerId: '87654321',
                maintainTime: '2024-01-16 14:20:00',
              },
              {
                dictTypeCode: 'CUST_TYPE',
                dictTypeName: '客户类型',
                dictItemCode: '03',
                dictItemName: '政府客户',
                sortOrder: 3,
                status: '启用',
                maintainerName: '李四',
                maintainerId: '87654321',
                maintainTime: '2024-01-16 14:20:00',
              },
              // 学历字典
              {
                dictTypeCode: 'EDUCATION',
                dictTypeName: '学历',
                dictItemCode: '01',
                dictItemName: '高中及以下',
                sortOrder: 1,
                status: '启用',
                maintainerName: '王五',
                maintainerId: '11223344',
                maintainTime: '2024-01-17 09:15:00',
              },
              {
                dictTypeCode: 'EDUCATION',
                dictTypeName: '学历',
                dictItemCode: '02',
                dictItemName: '大专',
                sortOrder: 2,
                status: '启用',
                maintainerName: '王五',
                maintainerId: '11223344',
                maintainTime: '2024-01-17 09:15:00',
              },
              {
                dictTypeCode: 'EDUCATION',
                dictTypeName: '学历',
                dictItemCode: '03',
                dictItemName: '本科',
                sortOrder: 3,
                status: '启用',
                maintainerName: '王五',
                maintainerId: '11223344',
                maintainTime: '2024-01-17 09:15:00',
              },
              {
                dictTypeCode: 'EDUCATION',
                dictTypeName: '学历',
                dictItemCode: '04',
                dictItemName: '硕士',
                sortOrder: 4,
                status: '启用',
                maintainerName: '王五',
                maintainerId: '11223344',
                maintainTime: '2024-01-17 09:15:00',
              },
              {
                dictTypeCode: 'EDUCATION',
                dictTypeName: '学历',
                dictItemCode: '05',
                dictItemName: '博士',
                sortOrder: 5,
                status: '启用',
                maintainerName: '王五',
                maintainerId: '11223344',
                maintainTime: '2024-01-17 09:15:00',
              },
              // 婚姻状况字典
              {
                dictTypeCode: 'MARITAL_STATUS',
                dictTypeName: '婚姻状况',
                dictItemCode: '01',
                dictItemName: '未婚',
                sortOrder: 1,
                status: '启用',
                maintainerName: '赵六',
                maintainerId: '55667788',
                maintainTime: '2024-01-18 11:45:00',
              },
              {
                dictTypeCode: 'MARITAL_STATUS',
                dictTypeName: '婚姻状况',
                dictItemCode: '02',
                dictItemName: '已婚',
                sortOrder: 2,
                status: '启用',
                maintainerName: '赵六',
                maintainerId: '55667788',
                maintainTime: '2024-01-18 11:45:00',
              },
              {
                dictTypeCode: 'MARITAL_STATUS',
                dictTypeName: '婚姻状况',
                dictItemCode: '03',
                dictItemName: '离异',
                sortOrder: 3,
                status: '启用',
                maintainerName: '赵六',
                maintainerId: '55667788',
                maintainTime: '2024-01-18 11:45:00',
              },
              {
                dictTypeCode: 'MARITAL_STATUS',
                dictTypeName: '婚姻状况',
                dictItemCode: '04',
                dictItemName: '丧偶',
                sortOrder: 4,
                status: '启用',
                maintainerName: '赵六',
                maintainerId: '55667788',
                maintainTime: '2024-01-18 11:45:00',
              },
              // 职业类型字典
              {
                dictTypeCode: 'OCCUPATION',
                dictTypeName: '职业类型',
                dictItemCode: '01',
                dictItemName: '公务员',
                sortOrder: 1,
                status: '启用',
                maintainerName: '孙七',
                maintainerId: '99887766',
                maintainTime: '2024-01-19 16:20:00',
              },
              {
                dictTypeCode: 'OCCUPATION',
                dictTypeName: '职业类型',
                dictItemCode: '02',
                dictItemName: '事业单位',
                sortOrder: 2,
                status: '启用',
                maintainerName: '孙七',
                maintainerId: '99887766',
                maintainTime: '2024-01-19 16:20:00',
              },
              {
                dictTypeCode: 'OCCUPATION',
                dictTypeName: '职业类型',
                dictItemCode: '03',
                dictItemName: '企业员工',
                sortOrder: 3,
                status: '启用',
                maintainerName: '孙七',
                maintainerId: '99887766',
                maintainTime: '2024-01-19 16:20:00',
              },
              {
                dictTypeCode: 'OCCUPATION',
                dictTypeName: '职业类型',
                dictItemCode: '04',
                dictItemName: '个体工商户',
                sortOrder: 4,
                status: '启用',
                maintainerName: '孙七',
                maintainerId: '99887766',
                maintainTime: '2024-01-19 16:20:00',
              },
              {
                dictTypeCode: 'OCCUPATION',
                dictTypeName: '职业类型',
                dictItemCode: '05',
                dictItemName: '自由职业',
                sortOrder: 5,
                status: '启用',
                maintainerName: '孙七',
                maintainerId: '99887766',
                maintainTime: '2024-01-19 16:20:00',
              },
              {
                dictTypeCode: 'OCCUPATION',
                dictTypeName: '职业类型',
                dictItemCode: '06',
                dictItemName: '退休',
                sortOrder: 6,
                status: '启用',
                maintainerName: '孙七',
                maintainerId: '99887766',
                maintainTime: '2024-01-19 16:20:00',
              },
              {
                dictTypeCode: 'OCCUPATION',
                dictTypeName: '职业类型',
                dictItemCode: '07',
                dictItemName: '学生',
                sortOrder: 7,
                status: '启用',
                maintainerName: '孙七',
                maintainerId: '99887766',
                maintainTime: '2024-01-19 16:20:00',
              },
              {
                dictTypeCode: 'OCCUPATION',
                dictTypeName: '职业类型',
                dictItemCode: '08',
                dictItemName: '其他',
                sortOrder: 8,
                status: '启用',
                maintainerName: '孙七',
                maintainerId: '99887766',
                maintainTime: '2024-01-19 16:20:00',
              },
            ],
            selectedDicts: [],
            dialogVisible: false,
            dialogTitle: '新增字典',

            // 直接填报相关数据
            directFilling1dData: {
              // 多级表头结构
              tableHeaders: [
                {
                  label: '重要(关键)岗位轮岗、强休情况',
                  children: [
                    {
                      label: '应轮岗柜员人数',
                      children: [
                        { label: '单位', prop: 'unit_1_1' },
                        { label: '当季度新增数', prop: 'newAdditions_1_1' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_1_1',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_1_1' },
                        { label: '填报责任部门', prop: 'responsibleDept_1_1' },
                        { label: '填报范围说明', prop: 'scopeDescription_1_1' },
                      ],
                    },
                    {
                      label: '应轮已轮柜员人数',
                      children: [
                        { label: '单位', prop: 'unit_1_1_1' },
                        { label: '当季度新增数', prop: 'newAdditions_1_1_1' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_1_1_1',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_1_1_1' },
                        { label: '填报责任部门', prop: 'responsibleDept_1_1_1' },
                        { label: '填报范围说明', prop: 'scopeDescription_1_1_1' },
                      ],
                    },
                    {
                      label: '应轮岗委派会计(授权经理)人数',
                      children: [
                        { label: '单位', prop: 'unit_1_2' },
                        { label: '当季度新增数', prop: 'newAdditions_1_2' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_1_2',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_1_2' },
                        { label: '填报责任部门', prop: 'responsibleDept_1_2' },
                        { label: '填报范围说明', prop: 'scopeDescription_1_2' },
                      ],
                    },
                    {
                      label: '应轮已轮委派会计(授权经理)人数',
                      children: [
                        { label: '单位', prop: 'unit_1_2_1' },
                        { label: '当季度新增数', prop: 'newAdditions_1_2_1' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_1_2_1',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_1_2_1' },
                        { label: '填报责任部门', prop: 'responsibleDept_1_2_1' },
                        { label: '填报范围说明', prop: 'scopeDescription_1_2_1' },
                      ],
                    },
                    {
                      label: '应轮岗基层负责人人数',
                      children: [
                        { label: '单位', prop: 'unit_1_3' },
                        { label: '当季度新增数', prop: 'newAdditions_1_3' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_1_3',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_1_3' },
                        { label: '填报责任部门', prop: 'responsibleDept_1_3' },
                        { label: '填报范围说明', prop: 'scopeDescription_1_3' },
                      ],
                    },
                    {
                      label: '应轮已轮基层负责人人数',
                      children: [
                        { label: '单位', prop: 'unit_1_3_1' },
                        { label: '当季度新增数', prop: 'newAdditions_1_3_1' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_1_3_1',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_1_3_1' },
                        { label: '填报责任部门', prop: 'responsibleDept_1_3_1' },
                        { label: '填报范围说明', prop: 'scopeDescription_1_3_1' },
                      ],
                    },
                    {
                      label: '应强制休假人数',
                      children: [
                        { label: '单位', prop: 'unit_1_4' },
                        { label: '当季度新增数', prop: 'newAdditions_1_4' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_1_4',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_1_4' },
                        { label: '填报责任部门', prop: 'responsibleDept_1_4' },
                        { label: '填报范围说明', prop: 'scopeDescription_1_4' },
                      ],
                    },
                    {
                      label: '应休已休人数',
                      children: [
                        { label: '单位', prop: 'unit_1_4_1' },
                        { label: '当季度新增数', prop: 'newAdditions_1_4_1' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_1_4_1',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_1_4_1' },
                        { label: '填报责任部门', prop: 'responsibleDept_1_4_1' },
                        { label: '填报范围说明', prop: 'scopeDescription_1_4_1' },
                      ],
                    },
                  ],
                },
                {
                  label: '员工变化、专职力量配备情况',
                  children: [
                    {
                      label: '离职员工人数',
                      children: [
                        { label: '单位', prop: 'unit_2_1' },
                        { label: '当季度新增数', prop: 'newAdditions_2_1' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_2_1',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_2_1' },
                        { label: '填报责任部门', prop: 'responsibleDept_2_1' },
                        { label: '填报范围说明', prop: 'scopeDescription_2_1' },
                      ],
                    },
                    {
                      label: '新增入职员工人数',
                      children: [
                        { label: '单位', prop: 'unit_2_2' },
                        { label: '当季度新增数', prop: 'newAdditions_2_2' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_2_2',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_2_2' },
                        { label: '填报责任部门', prop: 'responsibleDept_2_2' },
                        { label: '填报范围说明', prop: 'scopeDescription_2_2' },
                      ],
                    },
                    {
                      label: '专职内控案防人员人数',
                      children: [
                        { label: '单位', prop: 'unit_2_3' },
                        { label: '当季度新增数', prop: 'newAdditions_2_3' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_2_3',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_2_3' },
                        { label: '填报责任部门', prop: 'responsibleDept_2_3' },
                        { label: '填报范围说明', prop: 'scopeDescription_2_3' },
                      ],
                    },
                  ],
                },
                {
                  label: '从业人员处罚信息报送及使用情况',
                  children: [
                    {
                      label: '处罚信息报送人数',
                      children: [
                        { label: '单位', prop: 'unit_3_1' },
                        { label: '当季度新增数', prop: 'newAdditions_3_1' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_3_1',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_3_1' },
                        { label: '填报责任部门', prop: 'responsibleDept_3_1' },
                        { label: '填报范围说明', prop: 'scopeDescription_3_1' },
                      ],
                    },
                    {
                      label: '查询人数',
                      children: [
                        { label: '单位', prop: 'unit_3_2' },
                        { label: '当季度新增数', prop: 'newAdditions_3_2' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_3_2',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_3_2' },
                        { label: '填报责任部门', prop: 'responsibleDept_3_2' },
                        { label: '填报范围说明', prop: 'scopeDescription_3_2' },
                      ],
                    },
                    {
                      label: '存在处罚记录的人数',
                      children: [
                        { label: '单位', prop: 'unit_3_2_1' },
                        { label: '当季度新增数', prop: 'newAdditions_3_2_1' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_3_2_1',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_3_2_1' },
                        { label: '填报责任部门', prop: 'responsibleDept_3_2_1' },
                        { label: '填报范围说明', prop: 'scopeDescription_3_2_1' },
                      ],
                    },
                    {
                      label: '未提拔(任职)录用人数',
                      children: [
                        { label: '单位', prop: 'unit_3_2_2' },
                        { label: '当季度新增数', prop: 'newAdditions_3_2_2' },
                        {
                          label: '当季新增数中与当年内前期已报送数据的重复数',
                          prop: 'duplicates_3_2_2',
                        },
                        { label: '截至本季度末累计总数', prop: 'cumulativeTotal_3_2_2' },
                        { label: '填报责任部门', prop: 'responsibleDept_3_2_2' },
                        { label: '填报范围说明', prop: 'scopeDescription_3_2_2' },
                      ],
                    },
                  ],
                },
              ],
              // 表格数据
              tableData: [
                {
                  id: 1,
                  // 周计划数据
                  weekly_target: 0,
                  weekly_accumulated: 0,
                  weekly_completion_rate: 0,
                  // 累计数据
                  cumulative_target: 0,
                  cumulative_premium: 0,
                  cumulative_completion_rate: 0,
                  cumulative_ranking: 0,
                  // 5年交终身寿险(分红险)数据
                  whole_life_premium: 0,
                  whole_life_completion_rate: 0,
                  // 健康险数据
                  health_premium: 0,
                  health_completion_rate: 0,
                  // 保留原有字段以兼容
                  unit_1_1: '人',
                  newAdditions_1_1: 0,
                  duplicates_1_1: 0,
                  cumulativeTotal_1_1: 0,
                  responsibleDept_1_1: '人力资源部',
                  scopeDescription_1_1: '全行柜员',
                  unit_1_1_1: '人',
                  newAdditions_1_1_1: 0,
                  duplicates_1_1_1: 0,
                  cumulativeTotal_1_1_1: 0,
                  responsibleDept_1_1_1: '人力资源部',
                  scopeDescription_1_1_1: '全行柜员',
                  unit_1_2: '人',
                  newAdditions_1_2: 0,
                  duplicates_1_2: 0,
                  cumulativeTotal_1_2: 0,
                  responsibleDept_1_2: '人力资源部',
                  scopeDescription_1_2: '全行委派会计',
                  unit_1_2_1: '人',
                  newAdditions_1_2_1: 0,
                  duplicates_1_2_1: 0,
                  cumulativeTotal_1_2_1: 0,
                  responsibleDept_1_2_1: '人力资源部',
                  scopeDescription_1_2_1: '全行委派会计',
                  unit_1_3: '人',
                  newAdditions_1_3: 0,
                  duplicates_1_3: 0,
                  cumulativeTotal_1_3: 0,
                  responsibleDept_1_3: '人力资源部',
                  scopeDescription_1_3: '全行基层负责人',
                  unit_1_3_1: '人',
                  newAdditions_1_3_1: 0,
                  duplicates_1_3_1: 0,
                  cumulativeTotal_1_3_1: 0,
                  responsibleDept_1_3_1: '人力资源部',
                  scopeDescription_1_3_1: '全行基层负责人',
                  unit_1_4: '人',
                  newAdditions_1_4: 0,
                  duplicates_1_4: 0,
                  cumulativeTotal_1_4: 0,
                  responsibleDept_1_4: '人力资源部',
                  scopeDescription_1_4: '全行员工',
                  unit_1_4_1: '人',
                  newAdditions_1_4_1: 0,
                  duplicates_1_4_1: 0,
                  cumulativeTotal_1_4_1: 0,
                  responsibleDept_1_4_1: '人力资源部',
                  scopeDescription_1_4_1: '全行员工',
                  unit_2_1: '人',
                  newAdditions_2_1: 0,
                  duplicates_2_1: 0,
                  cumulativeTotal_2_1: 0,
                  responsibleDept_2_1: '人力资源部',
                  scopeDescription_2_1: '全行员工',
                  unit_2_2: '人',
                  newAdditions_2_2: 0,
                  duplicates_2_2: 0,
                  cumulativeTotal_2_2: 0,
                  responsibleDept_2_2: '人力资源部',
                  scopeDescription_2_2: '全行员工',
                  unit_2_3: '人',
                  newAdditions_2_3: 0,
                  duplicates_2_3: 0,
                  cumulativeTotal_2_3: 0,
                  responsibleDept_2_3: '风险管理部',
                  scopeDescription_2_3: '全行内控案防人员',
                  unit_3_1: '人',
                  newAdditions_3_1: 0,
                  duplicates_3_1: 0,
                  cumulativeTotal_3_1: 0,
                  responsibleDept_3_1: '风险管理部',
                  scopeDescription_3_1: '全行员工',
                  unit_3_2: '人',
                  newAdditions_3_2: 0,
                  duplicates_3_2: 0,
                  cumulativeTotal_3_2: 0,
                  responsibleDept_3_2: '风险管理部',
                  scopeDescription_3_2: '全行员工',
                  unit_3_2_1: '人',
                  newAdditions_3_2_1: 0,
                  duplicates_3_2_1: 0,
                  cumulativeTotal_3_2_1: 0,
                  responsibleDept_3_2_1: '风险管理部',
                  scopeDescription_3_2_1: '全行员工',
                  unit_3_2_2: '人',
                  newAdditions_3_2_2: 0,
                  duplicates_3_2_2: 0,
                  cumulativeTotal_3_2_2: 0,
                  responsibleDept_3_2_2: '风险管理部',
                  scopeDescription_3_2_2: '全行员工',
                },
              ],
              // 编辑状态
              // 表单验证规则
              validationRules: {
                newAdditions: [
                  { required: true, message: '请输入当季度新增数', trigger: 'blur' },
                  { type: 'number', message: '请输入有效数字', trigger: 'blur' },
                ],
                duplicates: [
                  { required: true, message: '请输入重复数', trigger: 'blur' },
                  { type: 'number', message: '请输入有效数字', trigger: 'blur' },
                ],
                cumulativeTotal: [
                  { required: true, message: '请输入累计总数', trigger: 'blur' },
                  { type: 'number', message: '请输入有效数字', trigger: 'blur' },
                ],
                responsibleDept: [
                  { required: true, message: '请输入填报责任部门', trigger: 'blur' },
                ],
                scopeDescription: [
                  { required: true, message: '请输入填报范围说明', trigger: 'blur' },
                ],
              },
            },

            // 数据校验规则管理相关数据
            ruleLoading: false,
            rulePageNum: 1,
            rulePageSize: 10,
            ruleTotal: 0,
            ruleSearchForm: {
              ruleCode: '',
              ruleName: '',
              validationType: '',
            },
            ruleList: [
              {
                sequence: 1,
                ruleCode: 'RULE001',
                ruleName: '手机号格式校验',
                validationType: 'regex',
                expression: '^1[3-9]\\d{9}$',
                beanId: 'phoneValidator',
                remark: '校验手机号格式是否正确',
                createDate: '2024-01-15',
                creator: '张三',
                status: '启用',
              },
              {
                sequence: 2,
                ruleCode: 'RULE002',
                ruleName: '身份证号校验',
                validationType: 'regex',
                expression:
                  '^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$',
                beanId: 'idCardValidator',
                remark: '校验身份证号格式和校验位',
                createDate: '2024-01-16',
                creator: '李四',
                status: '启用',
              },
              {
                sequence: 3,
                ruleCode: 'RULE003',
                ruleName: '金额范围校验',
                validationType: 'range',
                expression: '0-999999999.99',
                beanId: 'amountValidator',
                remark: '校验金额是否在合理范围内',
                createDate: '2024-01-17',
                creator: '王五',
                status: '启用',
              },
              {
                sequence: 4,
                ruleCode: 'RULE004',
                ruleName: '邮箱格式校验',
                validationType: 'regex',
                expression: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
                beanId: 'emailValidator',
                remark: '校验邮箱地址格式',
                createDate: '2024-01-18',
                creator: '赵六',
                status: '启用',
              },
              {
                sequence: 5,
                ruleCode: 'RULE005',
                ruleName: '自定义业务规则',
                validationType: 'custom',
                expression: 'customBusinessRule()',
                beanId: 'businessRuleValidator',
                remark: '自定义业务逻辑校验',
                createDate: '2024-01-19',
                creator: '孙七',
                status: '停用',
              },
            ],
            selectedRules: [],

            // 填报模板管理相关数据
            templateLoading: false,
            templatePageNum: 1,
            templatePageSize: 10,
            templateTotal: 0,
            templateSearchForm: {
              reportName: '',
              tableNameEn: '',
              businessLine: '',
              cycle: '',
            },
            templateList: [
              {
                reportName: '银行业金融机构案防情况统计表',
                tableNameEn: 'T_BANK_CASE_PREVENTION',
                tableNameCn: '银行业金融机构案防情况统计表',
                businessLine: 'risk',
                cycle: 'quarterly',
                hasTarget: false,
                fillingLevel: '总行',
                purpose: '统计银行业金融机构案防情况，包括重要岗位轮岗、员工变化、处罚信息等',
                status: '启用',
                maintainerName: '王**',
                maintainerId: '11223344',
                maintainTime: '2024-01-20 09:15:00',
              },
              {
                reportName: '公司客户基本信息表',
                tableNameEn: 'T_CORP_CUSTOMER_INFO',
                tableNameCn: '公司客户基本信息表',
                businessLine: 'corporate',
                cycle: 'monthly',
                hasTarget: true,
                fillingLevel: '分行',
                purpose: '统计公司客户基本信息和业务数据',
                status: '启用',
                maintainerName: '张三',
                maintainerId: '12345678',
                maintainTime: '2024-01-15 10:30:00',
              },
              {
                reportName: '零售客户资产统计表',
                tableNameEn: 'T_RETAIL_CUSTOMER_ASSET',
                tableNameCn: '零售客户资产统计表',
                businessLine: 'retail',
                cycle: 'monthly',
                hasTarget: true,
                fillingLevel: '区支行',
                purpose: '统计零售客户资产分布情况',
                status: '启用',
                maintainerName: '李四',
                maintainerId: '87654321',
                maintainTime: '2024-01-16 14:20:00',
              },
              {
                reportName: '金融市场交易日报',
                tableNameEn: 'T_MARKET_TRADE_DAILY',
                tableNameCn: '金融市场交易日报',
                businessLine: 'market',
                cycle: 'daily',
                hasTarget: false,
                fillingLevel: '总行',
                purpose: '记录金融市场每日交易数据',
                status: '启用',
                maintainerName: '王五',
                maintainerId: '11223344',
                maintainTime: '2024-01-17 09:15:00',
              },
              {
                reportName: '风险指标监控表',
                tableNameEn: 'T_RISK_INDICATOR_MONITOR',
                tableNameCn: '风险指标监控表',
                businessLine: 'risk',
                cycle: 'daily',
                hasTarget: true,
                fillingLevel: '总行',
                purpose: '监控各项风险指标变化情况',
                status: '启用',
                maintainerName: '赵六',
                maintainerId: '55667788',
                maintainTime: '2024-01-18 11:45:00',
              },
              {
                reportName: '公司金融业务季报',
                tableNameEn: 'T_CORP_BUSINESS_QUARTERLY',
                tableNameCn: '公司金融业务季报',
                businessLine: 'corporate',
                cycle: 'quarterly',
                hasTarget: true,
                fillingLevel: '分行',
                purpose: '统计公司金融业务季度发展情况',
                status: '停用',
                maintainerName: '孙七',
                maintainerId: '99887766',
                maintainTime: '2024-01-19 16:20:00',
              },
            ],
            selectedTemplates: [],

            // 数据校验规则管理弹窗相关数据
            ruleDialogVisible: false,
            ruleDialogTitle: '新增规则',
            ruleForm: {
              ruleCode: '',
              ruleName: '',
              validationType: '',
              expression: '',
              beanId: '',
              remark: '',
              status: '启用',
              sequence: 1,
            },
            ruleRules: {
              ruleCode: [{ required: true, message: '请输入校验规则编码', trigger: 'blur' }],
              ruleName: [{ required: true, message: '请输入校验规则名称', trigger: 'blur' }],
              validationType: [{ required: true, message: '请选择校验方式', trigger: 'change' }],
              expression: [{ required: true, message: '请输入表达式/脚本', trigger: 'blur' }],
              beanId: [{ required: true, message: '请输入BeanId', trigger: 'blur' }],
              status: [{ required: true, message: '请选择状态', trigger: 'change' }],
            },

            // 测试规则弹窗相关数据
            testRuleDialogVisible: false,
            testRuleDialogTitle: '测试校验规则',
            testRuleForm: {
              testValue: '',
              testResult: '',
              testMessage: '',
              isValid: null,
              testing: false,
            },
            currentTestRule: null,

            // 填报模板管理弹窗相关数据
            templateDialogVisible: false,
            templateDialogTitle: '新增模板',
            templateForm: {
              reportName: '',
              tableNameEn: '',
              tableNameCn: '',
              businessLine: '',
              cycle: '',
              hasTarget: true,
              fillingLevel: '',
              purpose: '',
              status: '启用',
              businessType: '',
              dataDate: null,
              sendToDataMarket: true,
              importStartRow: 1,
              templateFile: null,
            },
            templateFileList: [],
            templateRules: {
              reportName: [{ required: true, message: '请输入报表名称', trigger: 'blur' }],
              tableNameEn: [{ required: true, message: '请输入映射表英文名', trigger: 'blur' }],
              tableNameCn: [{ required: true, message: '请输入映射表中文名', trigger: 'blur' }],
              businessLine: [{ required: true, message: '请选择使用条线', trigger: 'change' }],
              businessType: [{ required: true, message: '请选择业务类型', trigger: 'change' }],
              importStartRow: [{ required: true, message: '请输入导入起始行', trigger: 'blur' }],
              cycle: [{ required: true, message: '请选择填报周期', trigger: 'change' }],
              fillingLevel: [{ required: true, message: '请选择填报层级', trigger: 'change' }],
              status: [{ required: true, message: '请选择启用状态', trigger: 'change' }],
            },

            // 字段配置相关数据
            templateConfigDialogVisible: false,
            templateConfigDialogTitle: '',
            expandedKeys: [1, 2, 3, 7], // 默认展开的节点

            // 预览相关数据
            templatePreviewDialogVisible: false,
            templatePreviewData: [
              {
                id: 1,
                weekly_target: 0,
                weekly_accumulated: 0,
                weekly_completion_rate: 0,
                cumulative_target: 0,
                cumulative_premium: 0,
                cumulative_completion_rate: 0,
                cumulative_ranking: 0,
                whole_life_premium: 0,
                whole_life_completion_rate: 0,
                health_premium: 0,
                health_completion_rate: 0,
              },
            ],
            fieldConfigTreeData: [
              {
                id: 1,
                level: 1,
                templateHeader: '周计划',
                unit: '',
                weeklyTarget: '',
                weeklyAccumulated: '',
                weeklyCompletionRate: '',
                fieldNameEn: '',
                fieldRemark: '',
                fieldType: '',
                length: '',
                validationRules: [],
                validationRuleNames: [],
                customRegex: '',
                dataDictionary: '',
                remark: '',
                children: [
                  {
                    id: 2,
                    level: 2,
                    templateHeader: '周目标',
                    unit: '',
                    weeklyTarget: '',
                    weeklyAccumulated: '',
                    weeklyCompletionRate: '',
                    fieldNameEn: 'weekly_target',
                    fieldRemark: '周目标数值',
                    fieldType: 'numeric',
                    length: '10',
                    validationRules: ['NON_NULL'],
                    validationRuleNames: ['非空'],
                    customRegex: '',
                    dataDictionary: '',
                    remark: '',
                  },
                  {
                    id: 3,
                    level: 2,
                    templateHeader: '本周累计',
                    unit: '',
                    weeklyTarget: '',
                    weeklyAccumulated: '',
                    weeklyCompletionRate: '',
                    fieldNameEn: 'weekly_accumulated',
                    fieldRemark: '本周累计数值',
                    fieldType: 'numeric',
                    length: '10',
                    validationRules: ['NON_NULL'],
                    validationRuleNames: ['非空'],
                    customRegex: '',
                    dataDictionary: '',
                    remark: '',
                  },
                  {
                    id: 4,
                    level: 2,
                    templateHeader: '完成率',
                    unit: '%',
                    weeklyTarget: '',
                    weeklyAccumulated: '',
                    weeklyCompletionRate: '',
                    fieldNameEn: 'weekly_completion_rate',
                    fieldRemark: '周完成率百分比',
                    fieldType: 'numeric',
                    length: '5,2',
                    validationRules: ['NON_NULL'],
                    validationRuleNames: ['非空'],
                    customRegex: '',
                    dataDictionary: '',
                    remark: '',
                  },
                ],
              },
              {
                id: 5,
                level: 1,
                templateHeader: '5年交长期交',
                unit: '',
                cumulativeTarget: '',
                cumulativePremium: '',
                cumulativeCompletionRate: '',
                cumulativeRanking: '',
                wholeLifePremium: '',
                wholeLifeCompletionRate: '',
                healthPremium: '',
                healthCompletionRate: '',
                fieldNameEn: '',
                fieldRemark: '',
                fieldType: '',
                length: '',
                validationRules: [],
                validationRuleNames: [],
                customRegex: '',
                dataDictionary: '',
                remark: '',
                children: [
                  {
                    id: 6,
                    level: 2,
                    templateHeader: '累计',
                    unit: '',
                    cumulativeTarget: '',
                    cumulativePremium: '',
                    cumulativeCompletionRate: '',
                    cumulativeRanking: '',
                    wholeLifePremium: '',
                    wholeLifeCompletionRate: '',
                    healthPremium: '',
                    healthCompletionRate: '',
                    fieldNameEn: '',
                    fieldRemark: '',
                    fieldType: '',
                    length: '',
                    validationRules: [],
                    validationRuleNames: [],
                    customRegex: '',
                    dataDictionary: '',
                    remark: '',
                    children: [
                      {
                        id: 7,
                        level: 3,
                        templateHeader: '目标',
                        unit: '',
                        cumulativeTarget: '',
                        cumulativePremium: '',
                        cumulativeCompletionRate: '',
                        cumulativeRanking: '',
                        wholeLifePremium: '',
                        wholeLifeCompletionRate: '',
                        healthPremium: '',
                        healthCompletionRate: '',
                        fieldNameEn: 'cumulative_target',
                        fieldRemark: '累计目标数值',
                        fieldType: 'numeric',
                        length: '10',
                        validationRules: ['NON_NULL'],
                        validationRuleNames: ['非空'],
                        customRegex: '',
                        dataDictionary: '',
                        remark: '',
                      },
                      {
                        id: 8,
                        level: 3,
                        templateHeader: '5年交长期交保费',
                        unit: '元',
                        cumulativeTarget: '',
                        cumulativePremium: '',
                        cumulativeCompletionRate: '',
                        cumulativeRanking: '',
                        wholeLifePremium: '',
                        wholeLifeCompletionRate: '',
                        healthPremium: '',
                        healthCompletionRate: '',
                        fieldNameEn: 'cumulative_premium',
                        fieldRemark: '5年交长期交保费金额',
                        fieldType: 'numeric',
                        length: '15,2',
                        validationRules: ['NON_NULL'],
                        validationRuleNames: ['非空'],
                        customRegex: '',
                        dataDictionary: '',
                        remark: '',
                      },
                      {
                        id: 9,
                        level: 3,
                        templateHeader: '完成率',
                        unit: '%',
                        cumulativeTarget: '',
                        cumulativePremium: '',
                        cumulativeCompletionRate: '',
                        cumulativeRanking: '',
                        wholeLifePremium: '',
                        wholeLifeCompletionRate: '',
                        healthPremium: '',
                        healthCompletionRate: '',
                        fieldNameEn: 'cumulative_completion_rate',
                        fieldRemark: '累计完成率百分比',
                        fieldType: 'numeric',
                        length: '5,2',
                        validationRules: ['NON_NULL'],
                        validationRuleNames: ['非空'],
                        customRegex: '',
                        dataDictionary: '',
                        remark: '',
                      },
                      {
                        id: 10,
                        level: 3,
                        templateHeader: '排名',
                        unit: '',
                        cumulativeTarget: '',
                        cumulativePremium: '',
                        cumulativeCompletionRate: '',
                        cumulativeRanking: '',
                        wholeLifePremium: '',
                        wholeLifeCompletionRate: '',
                        healthPremium: '',
                        healthCompletionRate: '',
                        fieldNameEn: 'cumulative_ranking',
                        fieldRemark: '累计排名',
                        fieldType: 'numeric',
                        length: '3',
                        validationRules: ['NON_NULL'],
                        validationRuleNames: ['非空'],
                        customRegex: '',
                        dataDictionary: '',
                        remark: '',
                      },
                    ],
                  },
                  {
                    id: 11,
                    level: 2,
                    templateHeader: '其中',
                    unit: '',
                    cumulativeTarget: '',
                    cumulativePremium: '',
                    cumulativeCompletionRate: '',
                    cumulativeRanking: '',
                    wholeLifePremium: '',
                    wholeLifeCompletionRate: '',
                    healthPremium: '',
                    healthCompletionRate: '',
                    fieldNameEn: '',
                    fieldRemark: '',
                    fieldType: '',
                    length: '',
                    validationRules: [],
                    validationRuleNames: [],
                    customRegex: '',
                    dataDictionary: '',
                    remark: '',
                    children: [
                      {
                        id: 12,
                        level: 3,
                        templateHeader: '5年交终身寿险(分红险)',
                        unit: '',
                        cumulativeTarget: '',
                        cumulativePremium: '',
                        cumulativeCompletionRate: '',
                        cumulativeRanking: '',
                        wholeLifePremium: '',
                        wholeLifeCompletionRate: '',
                        healthPremium: '',
                        healthCompletionRate: '',
                        fieldNameEn: '',
                        fieldRemark: '',
                        fieldType: '',
                        length: '',
                        validationRules: [],
                        validationRuleNames: [],
                        customRegex: '',
                        dataDictionary: '',
                        remark: '',
                        children: [
                          {
                            id: 13,
                            level: 4,
                            templateHeader: '保费',
                            unit: '元',
                            cumulativeTarget: '',
                            cumulativePremium: '',
                            cumulativeCompletionRate: '',
                            cumulativeRanking: '',
                            wholeLifePremium: '',
                            wholeLifeCompletionRate: '',
                            healthPremium: '',
                            healthCompletionRate: '',
                            fieldNameEn: 'whole_life_premium',
                            fieldRemark: '5年交终身寿险保费金额',
                            fieldType: 'numeric',
                            length: '15,2',
                            validationRules: ['NON_NULL'],
                            validationRuleNames: ['非空'],
                            customRegex: '',
                            dataDictionary: '',
                            remark: '',
                          },
                          {
                            id: 14,
                            level: 4,
                            templateHeader: '完成率',
                            unit: '%',
                            cumulativeTarget: '',
                            cumulativePremium: '',
                            cumulativeCompletionRate: '',
                            cumulativeRanking: '',
                            wholeLifePremium: '',
                            wholeLifeCompletionRate: '',
                            healthPremium: '',
                            healthCompletionRate: '',
                            fieldNameEn: 'whole_life_completion_rate',
                            fieldRemark: '5年交终身寿险完成率百分比',
                            fieldType: 'numeric',
                            length: '5,2',
                            validationRules: ['NON_NULL'],
                            validationRuleNames: ['非空'],
                            customRegex: '',
                            dataDictionary: '',
                            remark: '',
                          },
                        ],
                      },
                      {
                        id: 15,
                        level: 3,
                        templateHeader: '健康险',
                        unit: '',
                        cumulativeTarget: '',
                        cumulativePremium: '',
                        cumulativeCompletionRate: '',
                        cumulativeRanking: '',
                        wholeLifePremium: '',
                        wholeLifeCompletionRate: '',
                        healthPremium: '',
                        healthCompletionRate: '',
                        fieldNameEn: '',
                        fieldRemark: '',
                        fieldType: '',
                        length: '',
                        validationRules: [],
                        validationRuleNames: [],
                        customRegex: '',
                        dataDictionary: '',
                        remark: '',
                        children: [
                          {
                            id: 16,
                            level: 4,
                            templateHeader: '保费',
                            unit: '元',
                            cumulativeTarget: '',
                            cumulativePremium: '',
                            cumulativeCompletionRate: '',
                            cumulativeRanking: '',
                            wholeLifePremium: '',
                            wholeLifeCompletionRate: '',
                            healthPremium: '',
                            healthCompletionRate: '',
                            fieldNameEn: 'health_premium',
                            fieldRemark: '健康险保费金额',
                            fieldType: 'numeric',
                            length: '15,2',
                            validationRules: ['NON_NULL'],
                            validationRuleNames: ['非空'],
                            customRegex: '',
                            dataDictionary: '',
                            remark: '',
                          },
                          {
                            id: 17,
                            level: 4,
                            templateHeader: '完成率',
                            unit: '%',
                            cumulativeTarget: '',
                            cumulativePremium: '',
                            cumulativeCompletionRate: '',
                            cumulativeRanking: '',
                            wholeLifePremium: '',
                            wholeLifeCompletionRate: '',
                            healthPremium: '',
                            healthCompletionRate: '',
                            fieldNameEn: 'health_completion_rate',
                            fieldRemark: '健康险完成率百分比',
                            fieldType: 'numeric',
                            length: '5,2',
                            validationRules: ['NON_NULL'],
                            validationRuleNames: ['非空'],
                            customRegex: '',
                            dataDictionary: '',
                            remark: '',
                          },
                        ],
                      },
                    ],
                  },
                ],
              },
            ],

            // 数据填报相关数据
            dataFillingLoading: false,
            dataFillingActiveTab: 'pending',
            dataFillingSearchForm: {
              taskName: '',
              dataDateRange: '',
              cycle: '',
            },
            pendingTaskList: [
              {
                id: 1,
                taskName: '2024年第一季度案防情况统计',
                reportName: '银行业金融机构案防情况统计表',
                dataDate: '2024-03-31',
                cycle: '季报',
                businessLine: '风险管理',
                fillingLevel: '总行',
                deadline: '2024-04-15 18:00',
                status: '待填报',
                publisher: '李四',
                publishOrg: '总行风险管理部',
                publishTime: '2024-03-25 09:00:00',
              },
              {
                id: 2,
                taskName: '2024年1月个人存款月报',
                reportName: '个人存款统计表',
                dataDate: '2024-01-31',
                cycle: '月报',
                businessLine: '个人金融',
                fillingLevel: '分行',
                deadline: '2024-02-05 18:00',
                status: '待填报',
                publisher: '王五',
                publishOrg: '总行个人金融部',
                publishTime: '2024-01-28 14:30:00',
              },
              {
                id: 3,
                taskName: '2024年1月公司贷款月报',
                reportName: '公司贷款统计表',
                dataDate: '2024-01-31',
                cycle: '月报',
                businessLine: '公司金融',
                fillingLevel: '总行',
                deadline: '2024-02-03 18:00',
                status: '待填报',
                publisher: '赵六',
                publishOrg: '总行公司金融部',
                publishTime: '2024-01-28 16:15:00',
              },
              {
                id: 4,
                taskName: '2024年1月金融市场日报',
                reportName: '金融市场交易统计',
                dataDate: '2024-01-31',
                cycle: '日报',
                businessLine: '金融市场',
                fillingLevel: '总行',
                deadline: '2024-02-01 09:00',
                status: '待填报',
                publisher: '钱七',
                publishOrg: '总行金融市场部',
                publishTime: '2024-01-31 17:45:00',
              },
            ],
            completedTaskList: [
              {
                id: 4,
                taskName: '2023年第四季度案防情况统计',
                dataDate: '2023-12-31',
                cycle: '季报',
                submitTime: '2024-01-15 10:30',
                fillerName: '王**',
                fillerId: '11223344',
                fillerOrg: '总行风险管理部',
                orgCode: '100000',
                publisher: '李四',
                publishOrg: '总行风险管理部',
                publishTime: '2023-12-20 09:00:00',
              },
              {
                id: 5,
                taskName: '2023年12月个人存款月报',
                dataDate: '2023-12-31',
                cycle: '月报',
                submitTime: '2024-01-03 16:30',
                fillerName: '张**',
                fillerId: '12345678',
                fillerOrg: '上海分行',
                orgCode: '310000',
                publisher: '王五',
                publishOrg: '总行个人金融部',
                publishTime: '2023-12-25 14:30:00',
              },
              {
                id: 6,
                taskName: '2023年12月公司贷款月报',
                dataDate: '2023-12-31',
                cycle: '月报',
                submitTime: '2024-01-02 14:20',
                fillerName: '李**',
                fillerId: '87654321',
                fillerOrg: '总行公司金融部',
                orgCode: '100000',
                publisher: '赵六',
                publishOrg: '总行公司金融部',
                publishTime: '2023-12-25 16:15:00',
              },
            ],

            // 案防情况统计表数据
            casePreventionData: [
              // 第一大类：重要(关键)岗位轮岗、强休情况
              {
                id: 2,
                level: 2,
                item: '1.1 应轮岗柜员人数',
                category: '1. 重要(关键)岗位轮岗、强休情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '1.自营:人力资源部',
                reportingScope:
                  '指在重要岗位工作满一定期限，按规定应进行岗位轮换但尚未轮换的柜员人数。',
              },
              {
                id: 3,
                level: 3,
                item: '1.1.1 应轮已轮柜员人数',
                category: '1. 重要(关键)岗位轮岗、强休情况',
                unit: '人',
                newAdditions: 15,
                duplicates: 0,
                cumulativeTotal: 45,
                allowDuplicate: false,
                responsibleDept: '1.自营:人力资源部',
                reportingScope:
                  '指在重要岗位工作满一定期限，按规定应进行岗位轮换且已经轮换的柜员人数。',
              },
              {
                id: 4,
                level: 2,
                item: '1.2 应轮岗委派会计(授权经理)人数',
                category: '1. 重要(关键)岗位轮岗、强休情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '1.自营:人力资源部',
                reportingScope:
                  '指在重要岗位工作满一定期限，按规定应进行岗位轮换但尚未轮换的委派会计(授权经理)人数。',
              },
              {
                id: 5,
                level: 3,
                item: '1.2.1 应轮已轮委派会计(授权经理)人数',
                category: '1. 重要(关键)岗位轮岗、强休情况',
                unit: '人',
                newAdditions: 8,
                duplicates: 0,
                cumulativeTotal: 24,
                allowDuplicate: false,
                responsibleDept: '1.自营:人力资源部',
                reportingScope:
                  '指在重要岗位工作满一定期限，按规定应进行岗位轮换且已经轮换的委派会计(授权经理)人数。',
              },
              {
                id: 6,
                level: 2,
                item: '1.3 应轮岗基层负责人人数',
                category: '1. 重要(关键)岗位轮岗、强休情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '1.自营:人力资源部',
                reportingScope:
                  '指在重要岗位工作满一定期限，按规定应进行岗位轮换但尚未轮换的基层负责人人数。',
              },
              {
                id: 7,
                level: 3,
                item: '1.3.1 应轮已轮基层负责人人数',
                category: '1. 重要(关键)岗位轮岗、强休情况',
                unit: '人',
                newAdditions: 5,
                duplicates: 0,
                cumulativeTotal: 18,
                allowDuplicate: false,
                responsibleDept: '1.自营:人力资源部',
                reportingScope:
                  '指在重要岗位工作满一定期限，按规定应进行岗位轮换且已经轮换的基层负责人人数。',
              },
              {
                id: 8,
                level: 2,
                item: '1.4 应强制休假人数',
                category: '1. 重要(关键)岗位轮岗、强休情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '1.自营:人力资源部',
                reportingScope:
                  '指在重要岗位工作满一定期限，按规定应进行强制休假但尚未休假的人数。',
              },
              {
                id: 9,
                level: 3,
                item: '1.4.1 应休已休人数',
                category: '1. 重要(关键)岗位轮岗、强休情况',
                unit: '人',
                newAdditions: 12,
                duplicates: 2,
                cumulativeTotal: 35,
                allowDuplicate: true,
                responsibleDept: '1.自营:人力资源部',
                reportingScope:
                  '指在重要岗位工作满一定期限，按规定应进行强制休假且已经休假的人数。',
              },
              // 第二大类：员工变化、专职力量配备情况
              {
                id: 11,
                level: 3,
                item: '2.1 离职员工人数',
                category: '2. 员工变化、专职力量配备情况',
                unit: '人',
                newAdditions: 3,
                duplicates: 0,
                cumulativeTotal: 8,
                allowDuplicate: true,
                responsibleDept: '1.自营:人力资源部',
                reportingScope:
                  '指本季度内因各种原因离开本机构的员工人数，包括辞职、辞退、退休等。',
              },
              {
                id: 12,
                level: 3,
                item: '2.2 新增入职员工人数',
                category: '2. 员工变化、专职力量配备情况',
                unit: '人',
                newAdditions: 6,
                duplicates: 0,
                cumulativeTotal: 15,
                allowDuplicate: true,
                responsibleDept: '1.自营:人力资源部',
                reportingScope: '指本季度内新招聘并正式入职的员工人数。',
              },
              {
                id: 13,
                level: 3,
                item: '2.3 专职内控案防人员人数',
                category: '2. 员工变化、专职力量配备情况',
                unit: '人',
                newAdditions: 2,
                duplicates: 0,
                cumulativeTotal: 8,
                allowDuplicate: false,
                responsibleDept: '1.自营:风险管理部',
                reportingScope: '指专门从事内控和案防工作的专职人员人数，不包括兼职人员。',
              },
              // 第三大类：从业人员处罚信息报送及使用情况
              {
                id: 15,
                level: 3,
                item: '3.1 处罚信息报送人数',
                category: '3. 从业人员处罚信息报送及使用情况',
                unit: '人',
                newAdditions: 1,
                duplicates: 0,
                cumulativeTotal: 3,
                allowDuplicate: true,
                responsibleDept: '法律与合规部',
                reportingScope:
                  '指本季度内向监管部门报送处罚信息的从业人员人数，按人员统计，不重复计算。',
              },
              {
                id: 16,
                level: 2,
                item: '3.2 查询人数',
                category: '3. 从业人员处罚信息报送及使用情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '法律与合规部',
                reportingScope: '指本季度内查询从业人员处罚信息的人数。',
              },
              {
                id: 17,
                level: 3,
                item: '3.2.1 存在处罚记录的人数',
                category: '3. 从业人员处罚信息报送及使用情况',
                unit: '人',
                newAdditions: 2,
                duplicates: 0,
                cumulativeTotal: 5,
                allowDuplicate: true,
                responsibleDept: '法律与合规部',
                reportingScope: '指查询后发现存在处罚记录的从业人员人数。',
              },
              {
                id: 18,
                level: 3,
                item: '3.2.2 未提拔(任职)录用人数',
                category: '3. 从业人员处罚信息报送及使用情况',
                unit: '人',
                newAdditions: 1,
                duplicates: 0,
                cumulativeTotal: 2,
                allowDuplicate: true,
                responsibleDept: '法律与合规部',
                reportingScope: '指因存在处罚记录而未被提拔、任职或录用的人数。',
              },
              // 第四大类：银企对账情况
              {
                id: 20,
                level: 3,
                item: '4.1 上上季应对账户数',
                category: '4. 银企对账情况',
                unit: '户',
                newAdditions: 120,
                duplicates: 0,
                cumulativeTotal: 480,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 21,
                level: 3,
                item: '4.1.1 超过半年未能有效对账户数',
                category: '4. 银企对账情况',
                unit: '户',
                newAdditions: 5,
                duplicates: 0,
                cumulativeTotal: 15,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              // 第五大类：内审发现问题情况
              {
                id: 23,
                level: 3,
                item: '5.1 内审稽核营业网点个数',
                category: '5. 内审发现问题情况',
                unit: '个',
                newAdditions: 8,
                duplicates: 0,
                cumulativeTotal: 32,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 24,
                level: 3,
                item: '5.2 发现问题个数',
                category: '5. 内审发现问题情况',
                unit: '个',
                newAdditions: 12,
                duplicates: 0,
                cumulativeTotal: 45,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 25,
                level: 3,
                item: '5.2.1 整改问题个数',
                category: '5. 内审发现问题情况',
                unit: '个',
                newAdditions: 10,
                duplicates: 0,
                cumulativeTotal: 38,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 26,
                level: 3,
                item: '5.3 发现问题涉及金额',
                category: '5. 内审发现问题情况',
                unit: '万元',
                newAdditions: 25.6,
                duplicates: 0,
                cumulativeTotal: 98.3,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              // 第六大类：违规及举报查实情况
              {
                id: 28,
                level: 3,
                item: '6.1 违规人数',
                category: '6. 违规及举报查实情况',
                unit: '人',
                newAdditions: 2,
                duplicates: 0,
                cumulativeTotal: 6,
                allowDuplicate: true,
                responsibleDept: '运营管理部',
                reportingScope: '指本季度内新增的重复数据项数量。',
              },
              {
                id: 29,
                level: 3,
                item: '6.2 违规造成损失金额',
                category: '6. 违规及举报查实情况',
                unit: '万元',
                newAdditions: 3.2,
                duplicates: 0,
                cumulativeTotal: 12.8,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 30,
                level: 2,
                item: '6.3 被举报违规人数',
                category: '6. 违规及举报查实情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 31,
                level: 3,
                item: '6.3.1 内部举报人数',
                category: '6. 违规及举报查实情况',
                unit: '人',
                newAdditions: 1,
                duplicates: 0,
                cumulativeTotal: 3,
                allowDuplicate: true,
                responsibleDept: '运营管理部',
                reportingScope: '指本季度内新增的重复数据项数量。',
              },
              {
                id: 32,
                level: 3,
                item: '6.3.2 外部举报人数',
                category: '6. 违规及举报查实情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 1,
                allowDuplicate: true,
                responsibleDept: '运营管理部',
                reportingScope: '指本季度内新增的重复数据项数量。',
              },
              {
                id: 33,
                level: 3,
                item: '6.3.3 被举报的高管人数',
                category: '6. 违规及举报查实情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: true,
                responsibleDept: '运营管理部',
                reportingScope: '指本季度内新增的重复数据项数量。',
              },
              {
                id: 34,
                level: 2,
                item: '6.4 举报查实人数',
                category: '6. 违规及举报查实情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 35,
                level: 3,
                item: '6.4.1 已查实的高管人数',
                category: '6. 违规及举报查实情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: true,
                responsibleDept: '运营管理部',
                reportingScope: '指本季度内新增的重复数据项数量。',
              },
              // 第七大类：涉诉案件情况
              {
                id: 37,
                level: 2,
                item: '7.1 涉诉案件数量',
                category: '7. 涉诉案件情况',
                unit: '件',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 38,
                level: 3,
                item: '7.1.1 起诉案件数量',
                category: '7. 涉诉案件情况',
                unit: '件',
                newAdditions: 1,
                duplicates: 0,
                cumulativeTotal: 3,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 39,
                level: 3,
                item: '7.1.2 应诉案件数量',
                category: '7. 涉诉案件情况',
                unit: '件',
                newAdditions: 2,
                duplicates: 0,
                cumulativeTotal: 8,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 40,
                level: 3,
                item: '7.2 败诉案件数量',
                category: '7. 涉诉案件情况',
                unit: '件',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 1,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 41,
                level: 2,
                item: '7.3 涉诉案件金额',
                category: '7. 涉诉案件情况',
                unit: '万元',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 42,
                level: 3,
                item: '7.3.1 起诉案件金额',
                category: '7. 涉诉案件情况',
                unit: '万元',
                newAdditions: 15.6,
                duplicates: 0,
                cumulativeTotal: 48.9,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 43,
                level: 3,
                item: '7.3.2 应诉案件金额',
                category: '7. 涉诉案件情况',
                unit: '万元',
                newAdditions: 28.3,
                duplicates: 0,
                cumulativeTotal: 125.7,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 44,
                level: 3,
                item: '7.4 败诉案件金额',
                category: '7. 涉诉案件情况',
                unit: '万元',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 5.2,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 47,
                level: 2,
                item: '8.1 案件风险排查立项个数',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '个',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 48,
                level: 3,
                item: '8.1.1 完成项目个数',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '个',
                newAdditions: 3,
                duplicates: 0,
                cumulativeTotal: 12,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 49,
                level: 2,
                item: '8.2 排查业务笔数',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '笔',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 50,
                level: 3,
                item: '8.2.1 存在问题业务笔数',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '笔',
                newAdditions: 8,
                duplicates: 0,
                cumulativeTotal: 25,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 51,
                level: 3,
                item: '8.2.1.1 未整改业务笔数',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '笔',
                newAdditions: 2,
                duplicates: 0,
                cumulativeTotal: 6,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 52,
                level: 2,
                item: '8.3 排查业务涉及金额',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '万元',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 53,
                level: 3,
                item: '8.3.1 存在问题业务涉及金额',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '万元',
                newAdditions: 45.8,
                duplicates: 0,
                cumulativeTotal: 156.3,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 54,
                level: 3,
                item: '8.3.1.1 未整改问题业务涉及金额',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '万元',
                newAdditions: 12.5,
                duplicates: 0,
                cumulativeTotal: 38.7,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 55,
                level: 3,
                item: '8.4 排查发现案件风险个数',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '个',
                newAdditions: 1,
                duplicates: 0,
                cumulativeTotal: 3,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 56,
                level: 3,
                item: '8.5 排查发现案件风险涉及金额',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '万元',
                newAdditions: 8.9,
                duplicates: 0,
                cumulativeTotal: 28.4,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 57,
                level: 2,
                item: '8.6 员工行为排查人数',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 58,
                level: 3,
                item: '8.6.1 发现异常行为人数',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '人',
                newAdditions: 1,
                duplicates: 0,
                cumulativeTotal: 2,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
              {
                id: 59,
                level: 3,
                item: '8.6.1.1 涉及高管人数',
                category: '8. 案件风险排查、员工行为排查情况',
                unit: '人',
                newAdditions: 0,
                duplicates: 0,
                cumulativeTotal: 0,
                allowDuplicate: false,
                responsibleDept: '运营管理部',
                reportingScope: '指上上季度应对账的账户数量。',
              },
            ],

            // 填报信息表单数据
            fillingForm: {
              filler: '王**',
              phone: '186****0897',
              reviewer: '李**',
              manager: '张**',
            },

            // 表内编辑相关数据
            inlineEditDialogVisible: false,
            inlineEditData: [],

            // 数据上传相关数据
            dataUploadDialogVisible: false,
            uploadAction: '/api/upload', // 上传接口地址
            uploadHeaders: {
              Authorization: 'Bearer ' + localStorage.getItem('token'),
            },
            uploadData: {
              reportType: 'casePrevention', // 报表类型
            },
            fileList: [],
            uploadLoading: false,

            // 合并单元格相关数据
            spanArr: [], // 主表格的合并配置
            pos: 0, // 主表格的当前位置
            spanArrInline: [], // 表内编辑表格的合并配置
            posInline: 0, // 表内编辑表格的当前位置

            pendingTaskPageNum: 1,
            pendingTaskPageSize: 10,
            pendingTaskTotal: 3,
            completedTaskPageNum: 1,
            completedTaskPageSize: 10,
            completedTaskTotal: 2,
            selectedPendingTasks: [],
            selectedCompletedTasks: [],

            // 目标管理相关数据
            targetLoading: false,
            targetPageNum: 1,
            targetPageSize: 10,
            targetTotal: 0,
            targetSearchForm: {
              targetName: '',
              businessLine: '',
              targetCycle: '',
              status: '',
            },
            targetList: [
              {
                id: 1,
                targetName: '2024年个人存款增长目标',
                businessLine: '个人金融',
                targetCycle: '年度',
                targetYear: '2024',
                targetValue: '1000000',
                unit: '万元',
                createTime: '2024-01-01 10:00:00',
                status: '启用',
              },
              {
                id: 2,
                targetName: '2024年公司贷款增长目标',
                businessLine: '公司金融',
                targetCycle: '年度',
                targetYear: '2024',
                targetValue: '2000000',
                unit: '万元',
                createTime: '2024-01-01 10:00:00',
                status: '启用',
              },
              {
                id: 3,
                targetName: '2024年Q1金融市场交易目标',
                businessLine: '金融市场',
                targetCycle: '季度',
                targetYear: '2024',
                targetValue: '500000',
                unit: '万元',
                createTime: '2024-01-01 10:00:00',
                status: '启用',
              },
              {
                id: 4,
                targetName: '鼎福客户发展追踪目标填写',
                businessLine: '个人金融',
                targetCycle: '月度',
                targetYear: '2024',
                targetValue: '10000',
                unit: '户',
                createTime: '2024-08-01 10:00:00',
                status: '启用',
              },
            ],
            selectedTargets: [],

            // 定福目标相关数据
            dingfuTargetList: [],
            targetDialogVisible: false,
            targetDialogTitle: '',
            targetForm: {
              targetName: '',
              businessLine: '',
              targetCycle: '',
              targetYear: new Date().getFullYear(),
              targetTimeRange: [],
              targetValue: '',
              unit: '万元',
              description: '',
              fillingTips: '',
              fillingTipsImageList: [],
              status: '启用',
            },
            targetRules: {
              targetName: [{ required: true, message: '请输入目标名称', trigger: 'blur' }],
              businessLine: [{ required: true, message: '请选择业务线', trigger: 'change' }],
              targetCycle: [{ required: true, message: '请选择目标周期', trigger: 'change' }],
              targetYear: [{ required: true, message: '请输入目标年度', trigger: 'blur' }],
              targetValue: [{ required: true, message: '请输入目标值', trigger: 'blur' }],
              unit: [{ required: true, message: '请选择单位', trigger: 'change' }],
              status: [{ required: true, message: '请选择启用状态', trigger: 'change' }],
            },

            // 目标填报相关数据
            targetFillingLoading: false,
            targetFillingPageNum: 1,
            targetFillingPageSize: 10,
            targetFillingTotal: 0,
            targetFillingSearchForm: {
              targetName: '',
              businessLine: '',
              fillingCycle: '',
              status: '',
            },
            targetFillingList: [
              {
                id: 1,
                targetName: '2024年个人存款增长目标',
                businessLine: '个人金融',
                fillingCycle: '月度',
                targetValue: '1000000',
                unit: '户',
                allocatedValue: '83333',
                deadline: '2024-02-05 18:00',
                parentOrgFiller: '张**',
                parentOrgFillTime: '2024-01-15 14:30:00',
                status: '已填报',
              },
              {
                id: 2,
                targetName: '2024年公司贷款增长目标',
                businessLine: '公司金融',
                fillingCycle: '月度',
                targetValue: '2000000',
                unit: '户',
                allocatedValue: '166667',
                deadline: '2024-02-05 18:00',
                parentOrgFiller: '李**',
                parentOrgFillTime: '2024-01-16 09:15:00',
                status: '待填报',
              },
              {
                id: 3,
                targetName: '2024年Q1金融市场交易目标',
                businessLine: '金融市场',
                fillingCycle: '月度',
                targetValue: '500000',
                unit: '户',
                allocatedValue: '166667',
                deadline: '2024-02-05 18:00',
                parentOrgFiller: '王**',
                parentOrgFillTime: '2024-01-17 16:45:00',
                status: '已填报',
              },
              {
                id: 4,
                targetName: '鼎福客户发展追踪目标填写',
                businessLine: '个人金融',
                fillingCycle: '月度',
                targetValue: '10000',
                unit: '户',
                allocatedValue: '0',
                deadline: '2024-08-31 18:00',
                parentOrgFiller: '陈**',
                parentOrgFillTime: '2024-08-01 10:00:00',
                status: '待填报',
              },
            ],
            selectedTargetFillings: [],

            // 目标填报弹窗相关数据
            targetFillingDialogVisible: false,
            targetFillingDialogTitle: '',
            targetFillingDetailDialogVisible: false,
            targetFillingDetailDialogTitle: '',
            targetFillingTreeData: [
              {
                id: 1,
                level: 1,
                orgName: '上海分行',
                orgCode: '310000',
                unit: '户',
                allocatedValue: '50',
                remark: '',
                children: [
                  {
                    id: 2,
                    level: 2,
                    orgName: '浦东区支行',
                    orgCode: '310001',
                    unit: '户',
                    allocatedValue: '15',
                    remark: '',
                    children: [
                      {
                        id: 3,
                        level: 3,
                        orgName: '陆家嘴分理处',
                        orgCode: '310001001',
                        unit: '户',
                        allocatedValue: '5',
                        remark: '',
                      },
                      {
                        id: 4,
                        level: 3,
                        orgName: '张江分理处',
                        orgCode: '310001002',
                        unit: '户',
                        allocatedValue: '5',
                        remark: '',
                      },
                      {
                        id: 5,
                        level: 3,
                        orgName: '金桥分理处',
                        orgCode: '310001003',
                        unit: '户',
                        allocatedValue: '5',
                        remark: '',
                      },
                    ],
                  },
                  {
                    id: 6,
                    level: 2,
                    orgName: '徐汇区支行',
                    orgCode: '310002',
                    unit: '户',
                    allocatedValue: '15',
                    remark: '',
                    children: [
                      {
                        id: 7,
                        level: 3,
                        orgName: '徐家汇分理处',
                        orgCode: '310002001',
                        unit: '户',
                        allocatedValue: '8',
                        remark: '',
                      },
                      {
                        id: 8,
                        level: 3,
                        orgName: '田林分理处',
                        orgCode: '310002002',
                        unit: '户',
                        allocatedValue: '7',
                        remark: '',
                      },
                    ],
                  },
                  {
                    id: 9,
                    level: 2,
                    orgName: '静安区支行',
                    orgCode: '310003',
                    unit: '户',
                    allocatedValue: '20',
                    remark: '',
                    children: [
                      {
                        id: 10,
                        level: 3,
                        orgName: '南京西路分理处',
                        orgCode: '310003001',
                        unit: '户',
                        allocatedValue: '10',
                        remark: '',
                      },
                      {
                        id: 11,
                        level: 3,
                        orgName: '静安寺分理处',
                        orgCode: '310003002',
                        unit: '户',
                        allocatedValue: '10',
                        remark: '',
                      },
                    ],
                  },
                ],
              },
            ],
            targetFillingDetailTreeData: [
              {
                id: 1,
                level: 1,
                orgName: '上海分行',
                orgCode: '310000',
                unit: '户',
                allocatedValue: '50',
                remark: '超额完成',
                children: [
                  {
                    id: 2,
                    level: 2,
                    orgName: '浦东区支行',
                    orgCode: '310001',
                    unit: '户',
                    allocatedValue: '15',
                    remark: '表现优异',
                    children: [
                      {
                        id: 3,
                        level: 3,
                        orgName: '陆家嘴分理处',
                        orgCode: '310001001',
                        unit: '户',
                        allocatedValue: '5',
                        remark: '客户增长良好',
                      },
                      {
                        id: 4,
                        level: 3,
                        orgName: '张江分理处',
                        orgCode: '310001002',
                        unit: '户',
                        allocatedValue: '5',
                        remark: '科技企业客户增加',
                      },
                      {
                        id: 5,
                        level: 3,
                        orgName: '金桥分理处',
                        orgCode: '310001003',
                        unit: '户',
                        allocatedValue: '5',
                        remark: '制造业客户稳定',
                      },
                    ],
                  },
                  {
                    id: 6,
                    level: 2,
                    orgName: '徐汇区支行',
                    orgCode: '310002',
                    unit: '户',
                    allocatedValue: '15',
                    remark: '教育行业客户增长',
                    children: [
                      {
                        id: 7,
                        level: 3,
                        orgName: '徐家汇分理处',
                        orgCode: '310002001',
                        unit: '户',
                        allocatedValue: '8',
                        remark: '商业区客户活跃',
                      },
                      {
                        id: 8,
                        level: 3,
                        orgName: '田林分理处',
                        orgCode: '310002002',
                        unit: '户',
                        allocatedValue: '7',
                        remark: '商业区客户搬迁较多',
                      },
                    ],
                  },
                  {
                    id: 9,
                    level: 2,
                    orgName: '静安区支行',
                    orgCode: '310003',
                    unit: '户',
                    allocatedValue: '20',
                    remark: '高端客户增长',
                    children: [
                      {
                        id: 10,
                        level: 3,
                        orgName: '南京西路分理处',
                        orgCode: '310003001',
                        unit: '户',
                        allocatedValue: '10',
                        remark: '奢侈品客户增加',
                      },
                      {
                        id: 11,
                        level: 3,
                        orgName: '静安寺分理处',
                        orgCode: '310003002',
                        unit: '户',
                        allocatedValue: '10',
                        remark: '-',
                      },
                    ],
                  },
                ],
              },
            ],

            // 填报情况统计相关数据
            reportCollectionLoading: false,
            reportCollectionPageNum: 1,
            reportCollectionPageSize: 10,
            reportCollectionTotal: 0,
            reportCollectionSearchForm: {
              reportName: '',
              businessLine: '',
              cycle: '',
              dataDateRange: '',
            },
            reportCollectionStats: {
              totalReports: 15,
              completedReports: 12,
              pendingReports: 2,
              overdueReports: 1,
            },
            reportCollectionList: [
              {
                id: 1,
                reportName: '2024年1月个人存款月报',
                businessLine: '个人金融',
                cycle: '月报',
                dataDate: '2024-01-31',
                fillingLevel: '分行',
                totalOrgs: 25,
                completedOrgs: 25,
                completionRate: 100,
                deadline: '2024-02-05 18:00',
                status: '已完成',
                publisher: '王五',
                publishOrg: '总行个人金融部',
                publishTime: '2024-01-28 14:30:00',
              },
              {
                id: 2,
                reportName: '2024年1月公司贷款月报',
                businessLine: '公司金融',
                cycle: '月报',
                dataDate: '2024-01-31',
                fillingLevel: '总行',
                totalOrgs: 8,
                completedOrgs: 6,
                completionRate: 75,
                deadline: '2024-02-03 18:00',
                status: '进行中',
                publisher: '赵六',
                publishOrg: '总行公司金融部',
                publishTime: '2024-01-28 16:15:00',
              },
              {
                id: 3,
                reportName: '2024年1月金融市场日报',
                businessLine: '金融市场',
                cycle: '日报',
                dataDate: '2024-01-31',
                fillingLevel: '总行',
                totalOrgs: 3,
                completedOrgs: 2,
                completionRate: 67,
                deadline: '2024-02-01 09:00',
                status: '待填报',
                publisher: '钱七',
                publishOrg: '总行金融市场部',
                publishTime: '2024-01-31 17:45:00',
              },
              {
                id: 4,
                reportName: '2023年12月个人存款月报',
                businessLine: '个人金融',
                cycle: '月报',
                dataDate: '2023-12-31',
                fillingLevel: '分行',
                totalOrgs: 25,
                completedOrgs: 20,
                completionRate: 80,
                deadline: '2024-01-05 18:00',
                status: '已超期',
                publisher: '王五',
                publishOrg: '总行个人金融部',
                publishTime: '2023-12-25 14:30:00',
              },
            ],
            selectedReportCollections: [],

            // 审计日志相关数据
            auditLogLoading: false,
            auditLogPageNum: 1,
            auditLogPageSize: 10,
            auditLogTotal: 0,
            auditLogSearchForm: {
              timeRange: '',
              logType: '',
              operator: '',
              module: '',
              operationType: '',
              isException: '',
              exceptionStack: '',
            },
            auditLogList: [
              {
                id: 1,
                time: '2024-01-15 14:30:25',
                logType: '登录使用日志',
                operator: '张** (12345678)',
                module: '系统登录',
                operationType: '登录',
                requestBody: '{"username":"zhang***","password":"***","loginType":"web"}',
                responseBody:
                  '{"code":200,"message":"登录成功","token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}',
                isException: false,
                exceptionStack: '',
              },
              {
                id: 2,
                time: '2024-01-15 14:32:10',
                logType: '数据上传日志',
                operator: '张** (12345678)',
                module: '数据字典管理',
                operationType: '新增',
                requestBody:
                  '{"dictTypeCode":"CUSTOMER_TYPE","dictTypeName":"客户类型","dictItemCode":"PERSONAL","dictItemName":"个人客户"}',
                responseBody: '{"code":200,"message":"新增成功","data":{"id":1001}}',
                isException: false,
                exceptionStack: '',
              },
              {
                id: 3,
                time: '2024-01-15 14:35:45',
                logType: '数据上传日志',
                operator: '李** (87654321)',
                module: '填报模板管理',
                operationType: '上传',
                requestBody:
                  '{"templateId":2001,"fileName":"公司贷款统计表.xlsx","fileSize":1024000}',
                responseBody: '{"code":200,"message":"上传成功","templateId":2001}',
                isException: false,
                exceptionStack: '',
              },
              {
                id: 4,
                time: '2024-01-15 14:40:20',
                logType: '系统运行日志',
                operator: '系统',
                module: '数据填报',
                operationType: '查询',
                requestBody:
                  '{"userId":11223344,"queryType":"pendingTasks","pageNum":1,"pageSize":10}',
                responseBody: '{"code":200,"message":"查询成功","data":{"total":5,"list":[...]}}',
                isException: false,
                exceptionStack: '',
              },
              {
                id: 5,
                time: '2024-01-15 14:45:15',
                logType: '数据上传日志',
                operator: '赵** (55667788)',
                module: '数据校验规则管理',
                operationType: '新增',
                requestBody:
                  '{"ruleName":"手机号格式校验","ruleCode":"PHONE_FORMAT","expression":"^1[3-9]\\d{9}$"}',
                responseBody: '{"code":200,"message":"新增成功","ruleId":5001}',
                isException: false,
                exceptionStack: '',
              },
              {
                id: 6,
                time: '2024-01-15 14:50:30',
                logType: '数据上传日志',
                operator: '陈** (99887766)',
                module: '目标管理',
                operationType: '删除',
                requestBody: '{"targetId":4001,"deleteReason":"目标已过期"}',
                responseBody:
                  '{"code":500,"message":"删除失败","error":"目标正在使用中，无法删除"}',
                isException: true,
                exceptionStack:
                  'java.lang.IllegalStateException: 目标正在使用中，无法删除\n\tat com.example.service.TargetService.deleteTarget(TargetService.java:45)\n\tat com.example.controller.TargetController.delete(TargetController.java:78)',
              },
            ],
            selectedAuditLogs: [],

            // 填报明细相关数据
            fillingDetailLoading: false,
            fillingDetailPageNum: 1,
            fillingDetailPageSize: 10,
            fillingDetailTotal: 0,
            fillingDetailSearchForm: {
              taskName: '',
              dataDateRange: '',
              cycle: '',
              fillerOrg: '',
            },
            fillingDetailList: [
              {
                id: 1,
                taskName: '2024年1月个人存款月报',
                cycle: '月报',
                dataDate: '2024-01-31',
                fillingTime: '2024-02-01 09:30:00',
                fillerName: '张**',
                fillerOrg: '上海分行',
                uploadStatus: '已上传',
                publisher: '王五',
                publishOrg: '总行个人金融部',
                publishTime: '2024-01-28 14:30:00',
              },
              {
                id: 2,
                taskName: '2024年1月公司贷款月报',
                cycle: '月报',
                dataDate: '2024-01-31',
                fillingTime: '2024-02-01 14:20:00',
                fillerName: '李**',
                fillerOrg: '浦东区支行',
                uploadStatus: '已上传',
                publisher: '赵六',
                publishOrg: '总行公司金融部',
                publishTime: '2024-01-28 16:15:00',
              },
              {
                id: 3,
                taskName: '2024年1月金融市场日报',
                cycle: '日报',
                dataDate: '2024-01-31',
                fillingTime: '2024-02-01 16:45:00',
                fillerName: '王**',
                fillerOrg: '徐汇区支行',
                uploadStatus: '待上传',
                publisher: '钱七',
                publishOrg: '总行金融市场部',
                publishTime: '2024-01-31 17:45:00',
              },
              {
                id: 4,
                taskName: '2023年12月个人存款月报',
                cycle: '月报',
                dataDate: '2023-12-31',
                fillingTime: '2024-01-02 10:15:00',
                fillerName: '赵**',
                fillerOrg: '静安区支行',
                uploadStatus: '上传失败',
                publisher: '王五',
                publishOrg: '总行个人金融部',
                publishTime: '2023-12-25 14:30:00',
              },
            ],
            selectedFillingDetails: [],

            // 数据预览弹窗相关数据
            fillingDataPreviewDialogVisible: false,
            previewData: {
              taskName: '',
              dataDate: '',
              fillerName: '',
              fillerOrg: '',
              dataContent: [],
            },

            dictForm: {
              dictTypeCode: '',
              dictTypeName: '',
              dictItemCode: '',
              dictItemName: '',
              sortOrder: 1,
              status: '启用',
            },
            dictRules: {
              dictTypeCode: [{ required: true, message: '请输入字典类型编码', trigger: 'blur' }],
              dictTypeName: [{ required: true, message: '请输入字典类型名称', trigger: 'blur' }],
              dictItemCode: [{ required: true, message: '请输入字典项编码', trigger: 'blur' }],
              dictItemName: [{ required: true, message: '请输入字典项名称', trigger: 'blur' }],
              status: [{ required: true, message: '请选择状态', trigger: 'change' }],
            },

            // 案防统计管理相关数据
            casePreventionLoading: false,
            casePreventionPageNum: 1,
            casePreventionPageSize: 10,
            casePreventionTotal: 0,
            casePreventionSearchForm: {
              typeName: '',
              projectName: '',
            },
            casePreventionList: [
              {
                id: 1,
                type: 'projectType',
                name: '1. 重要(关键)岗位轮岗、强休情况',
                code: 'ROTATION_VACATION',
                description: '重要岗位轮岗和强制休假相关统计项目',
                status: '启用',
                createTime: '2024-01-15 10:30:00',
                fillingLine: '人力资源部',
                reportingScope:
                  '统计重要岗位人员轮岗和强制休假情况，包括柜员、委派会计、基层负责人等',
                basicValidation: '所有子项目数值范围：≥0，整数',
                specificValidation: '各岗位应轮岗人数 = 应轮已轮人数 + 应轮未轮人数',
                children: [
                  {
                    id: 11,
                    type: 'project',
                    name: '1.1 应轮岗柜员人数',
                    code: 'ROTATION_TELLER',
                    description:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换但尚未轮换的柜员人数',
                    status: '启用',
                    createTime: '2024-01-15 10:35:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换但尚未轮换的柜员人数。',
                    basicValidation: '数值范围：≥0，整数',
                    specificValidation: '应轮岗柜员人数 = 应轮已轮柜员人数 + 应轮未轮柜员人数',
                  },
                  {
                    id: 12,
                    type: 'project',
                    name: '1.1.1 应轮已轮柜员人数',
                    code: 'ROTATION_TELLER_DONE',
                    description:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换且已经轮换的柜员人数',
                    status: '启用',
                    createTime: '2024-01-15 10:40:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换且已经轮换的柜员人数。',
                    basicValidation: '数值范围：≥0，整数',
                    specificValidation: '应轮已轮柜员人数 ≤ 应轮岗柜员人数',
                  },
                  {
                    id: 13,
                    type: 'project',
                    name: '1.2 应轮岗委派会计(授权经理)人数',
                    code: 'ROTATION_ACCOUNTANT',
                    description:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换但尚未轮换的委派会计(授权经理)人数',
                    status: '启用',
                    createTime: '2024-01-15 10:45:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换但尚未轮换的委派会计(授权经理)人数。',
                    basicValidation: '数值范围：≥0，整数',
                    specificValidation:
                      '应轮岗委派会计人数 = 应轮已轮委派会计人数 + 应轮未轮委派会计人数',
                  },
                  {
                    id: 14,
                    type: 'project',
                    name: '1.2.1 应轮已轮委派会计(授权经理)人数',
                    code: 'ROTATION_ACCOUNTANT_DONE',
                    description:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换且已经轮换的委派会计(授权经理)人数',
                    status: '启用',
                    createTime: '2024-01-15 10:50:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换且已经轮换的委派会计(授权经理)人数。',
                    basicValidation: '数值范围：≥0，整数',
                    specificValidation: '应轮已轮委派会计人数 ≤ 应轮岗委派会计人数',
                  },
                  {
                    id: 15,
                    type: 'project',
                    name: '1.3 应轮岗基层负责人人数',
                    code: 'ROTATION_MANAGER',
                    description:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换但尚未轮换的基层负责人人数',
                    status: '启用',
                    createTime: '2024-01-15 10:55:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换但尚未轮换的基层负责人人数。',
                  },
                  {
                    id: 16,
                    type: 'project',
                    name: '1.3.1 应轮已轮基层负责人人数',
                    code: 'ROTATION_MANAGER_DONE',
                    description:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换且已经轮换的基层负责人人数',
                    status: '启用',
                    createTime: '2024-01-15 11:00:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope:
                      '指在重要岗位工作满一定期限，按规定应进行岗位轮换且已经轮换的基层负责人人数。',
                  },
                  {
                    id: 17,
                    type: 'project',
                    name: '1.4 应强制休假人数',
                    code: 'FORCED_VACATION',
                    description: '指在重要岗位工作满一定期限，按规定应进行强制休假但尚未休假的人数',
                    status: '启用',
                    createTime: '2024-01-15 11:05:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope:
                      '指在重要岗位工作满一定期限，按规定应进行强制休假但尚未休假的人数。',
                  },
                  {
                    id: 18,
                    type: 'project',
                    name: '1.4.1 应休已休人数',
                    code: 'FORCED_VACATION_DONE',
                    description: '指在重要岗位工作满一定期限，按规定应进行强制休假且已经休假的人数',
                    status: '启用',
                    createTime: '2024-01-15 11:10:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope:
                      '指在重要岗位工作满一定期限，按规定应进行强制休假且已经休假的人数。',
                  },
                ],
              },
              {
                id: 2,
                type: 'projectType',
                name: '2. 员工变化、专职力量配备情况',
                code: 'EMPLOYEE_CHANGES',
                description: '员工变化和专职力量配备相关统计项目',
                status: '启用',
                createTime: '2024-01-16 09:20:00',
                fillingLine: '人力资源部',
                reportingScope: '统计员工变化情况和专职力量配备情况，包括离职、入职、内部调动等',
                basicValidation: '所有子项目数值范围：≥0，整数',
                specificValidation: '员工总数变化 = 新增入职人数 - 离职人数 + 内部调动净变化',
                children: [
                  {
                    id: 21,
                    type: 'project',
                    name: '2.1 离职员工人数',
                    code: 'EMPLOYEE_RESIGNATION',
                    description: '指本季度内因各种原因离开本机构的员工人数，包括辞职、辞退、退休等',
                    status: '启用',
                    createTime: '2024-01-16 09:25:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope:
                      '指本季度内因各种原因离开本机构的员工人数，包括辞职、辞退、退休等。',
                    basicValidation: '数值范围：≥0，整数',
                    specificValidation: '离职员工人数 ≤ 上季度末员工总数',
                  },
                  {
                    id: 22,
                    type: 'project',
                    name: '2.2 新增入职员工人数',
                    code: 'EMPLOYEE_NEW_HIRE',
                    description: '指本季度内新招聘并正式入职的员工人数',
                    status: '启用',
                    createTime: '2024-01-16 09:30:00',
                    fillingLine: '人力资源部',
                    unit: '人',
                    reportingScope: '指本季度内新招聘并正式入职的员工人数。',
                  },
                  {
                    id: 23,
                    type: 'project',
                    name: '2.3 专职内控案防人员人数',
                    code: 'DEDICATED_RISK_STAFF',
                    description: '指专门从事内控和案防工作的专职人员人数，不包括兼职人员',
                    status: '启用',
                    createTime: '2024-01-16 09:35:00',
                    fillingLine: '风险管理部',
                    unit: '人',
                    reportingScope: '指专门从事内控和案防工作的专职人员人数，不包括兼职人员。',
                  },
                ],
              },
              {
                id: 3,
                type: 'projectType',
                name: '3. 从业人员处罚信息报送及使用情况',
                code: 'PENALTY_INFO',
                description: '从业人员处罚信息报送及使用相关统计项目',
                status: '启用',
                createTime: '2024-01-17 14:15:00',
                fillingLine: '法律与合规部',
                reportingScope:
                  '统计从业人员处罚信息报送和使用情况，包括报送人数、查询人数、处罚记录等',
                basicValidation: '所有子项目数值范围：≥0，整数',
                specificValidation: '存在处罚记录的人数 ≤ 查询人数 ≤ 从业人员总数',
                children: [
                  {
                    id: 31,
                    type: 'project',
                    name: '3.1 处罚信息报送人数',
                    code: 'PENALTY_REPORT_COUNT',
                    description:
                      '指本季度内向监管部门报送处罚信息的从业人员人数，按人员统计，不重复计算',
                    status: '启用',
                    createTime: '2024-01-17 14:20:00',
                    fillingLine: '法律与合规部',
                    unit: '人',
                    reportingScope:
                      '指本季度内向监管部门报送处罚信息的从业人员人数，按人员统计，不重复计算。',
                    basicValidation: '数值范围：≥0，整数',
                    specificValidation: '报送人数 ≤ 从业人员总数',
                  },
                  {
                    id: 32,
                    type: 'project',
                    name: '3.2 查询人数',
                    code: 'PENALTY_QUERY_COUNT',
                    description: '指本季度内查询从业人员处罚信息的人数',
                    status: '启用',
                    createTime: '2024-01-17 14:25:00',
                    fillingLine: '法律与合规部',
                    unit: '人',
                    reportingScope: '指本季度内查询从业人员处罚信息的人数。',
                  },
                  {
                    id: 33,
                    type: 'project',
                    name: '3.2.1 存在处罚记录的人数',
                    code: 'PENALTY_RECORD_COUNT',
                    description: '指查询后发现存在处罚记录的从业人员人数',
                    status: '启用',
                    createTime: '2024-01-17 14:30:00',
                    fillingLine: '法律与合规部',
                    unit: '人',
                    reportingScope: '指查询后发现存在处罚记录的从业人员人数。',
                  },
                  {
                    id: 34,
                    type: 'project',
                    name: '3.2.2 未提拔(任职)录用人数',
                    code: 'PENALTY_NO_PROMOTION',
                    description: '指因存在处罚记录而未被提拔、任职或录用的人数',
                    status: '启用',
                    createTime: '2024-01-17 14:35:00',
                    fillingLine: '法律与合规部',
                    unit: '人',
                    reportingScope: '指因存在处罚记录而未被提拔、任职或录用的人数。',
                  },
                ],
              },
            ],
            selectedCasePreventionItems: [],
            expandedKeys: [1, 2, 3], // 默认展开所有项目类型
            casePreventionDialogVisible: false,
            casePreventionDialogTitle: '新增项目类型',
            casePreventionForm: {
              type: 'projectType',
              parentId: '',
              name: '',
              code: '',
              description: '',
              status: '启用',
              fillingLine: '',
              unit: '',
              reportingScope: '',
            },
            casePreventionRules: {
              type: [{ required: true, message: '请选择类型', trigger: 'change' }],
              parentId: [{ required: true, message: '请选择项目类型', trigger: 'change' }],
              name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
              code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
              status: [{ required: true, message: '请选择状态', trigger: 'change' }],
              fillingLine: [{ required: true, message: '请选择填报条线', trigger: 'change' }],
              unit: [{ required: true, message: '请输入单位', trigger: 'blur' }],
            },
            projectTypeOptions: [
              { id: 1, name: '1. 重要(关键)岗位轮岗、强休情况' },
              { id: 2, name: '2. 员工变化、专职力量配备情况' },
              { id: 3, name: '3. 从业人员处罚信息报送及使用情况' },
            ],
            fillingLineOptions: [
              { value: '人力资源部', label: '人力资源部' },
              { value: '风险管理部', label: '风险管理部' },
              { value: '法律与合规部', label: '法律与合规部' },
              { value: '运营管理部', label: '运营管理部' },
              { value: '个人金融部', label: '个人金融部' },
              { value: '公司金融部', label: '公司金融部' },
              { value: '小企业金融部', label: '小企业金融部' },
              { value: '交易银行部', label: '交易银行部' },
              { value: '计财部', label: '计财部' },
              { value: '党建部', label: '党建部' },
            ],

            // 版本管理相关数据
            currentVersion: 1, // 当前选中的版本ID
            versionList: [
              {
                id: 1,
                name: '2024年Q1案防统计',
                quarter: '2024年Q1',
                status: '进行中',
                createTime: '2024-01-15',
                projectCount: 15,
                description: '2024年第一季度案防情况统计',
              },
              {
                id: 2,
                name: '2024年Q2案防统计',
                quarter: '2024年Q2',
                status: '已完成',
                createTime: '2024-04-01',
                projectCount: 18,
                description: '2024年第二季度案防情况统计',
              },
              {
                id: 3,
                name: '2024年Q3案防统计',
                quarter: '2024年Q3',
                status: '草稿',
                createTime: '2024-07-01',
                projectCount: 12,
                description: '2024年第三季度案防情况统计',
              },
            ],
            currentVersionInfo: {
              id: 1,
              name: '2024年Q1案防统计',
              status: '进行中',
            },
            newVersionDialogVisible: false,
            newVersionForm: {
              name: '',
              createType: 'blank',
              sourceVersionId: '',
              description: '',
            },
            newVersionRules: {
              name: [{ required: true, message: '请输入版本名称', trigger: 'blur' }],
              createType: [{ required: true, message: '请选择创建方式', trigger: 'change' }],
              sourceVersionId: [{ required: true, message: '请选择源版本', trigger: 'change' }],
            },
          }
        },
        mounted() {
          this.total = this.dictList.length
          this.ruleTotal = this.ruleList.length
          this.templateTotal = this.templateList.length
          this.casePreventionTotal = this.casePreventionList.length
          this.targetTotal = this.targetList.length
          this.targetFillingTotal = this.targetFillingList.length
          this.dingfuTargetTotal = this.dingfuTargetList.length
          // 初始化主表格的合并配置
          this.calculateSpanArr(this.casePreventionData, 'category', false)
          this.reportCollectionTotal = this.reportCollectionList.length
          this.auditLogTotal = this.auditLogList.length
          this.fillingDetailTotal = this.fillingDetailList.length
        },
        methods: {
          // 处理菜单选择
          handleMenuSelect(index) {
            console.log('菜单点击:', index)
            // 滚动到对应的页面
            const element = document.getElementById(index)
            console.log('找到元素:', element)
            if (element) {
              element.scrollIntoView({
                behavior: 'smooth',
                block: 'start',
              })
            } else {
              console.error('未找到页面元素:', index)
            }
          },
          // 处理用户下拉菜单
          handleCommand(command) {
            switch (command) {
              case 'profile':
                this.$message.info('跳转到个人中心')
                break
              case 'settings':
                this.$message.info('跳转到系统设置')
                break
              case 'logout':
                this.$confirm('确定要退出登录吗？', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                }).then(() => {
                  this.$message.success('已退出登录')
                })
                break
            }
          },
          handleSearch() {
            this.loading = true
            // 模拟搜索
            setTimeout(() => {
              this.loading = false
              this.$message.success('查询完成')
            }, 1000)
          },
          handleReset() {
            this.searchForm = {
              dictTypeCode: '',
              dictTypeName: '',
            }
          },
          handleSelectionChange(selection) {
            this.selectedDicts = selection
          },
          batchEnable() {
            if (this.selectedDicts.length === 0) {
              this.$message.warning('请选择要启用的记录')
              return
            }
            this.$message.success(`已启用 ${this.selectedDicts.length} 条记录`)
          },
          batchDisable() {
            if (this.selectedDicts.length === 0) {
              this.$message.warning('请选择要停用的记录')
              return
            }
            this.$message.success(`已停用 ${this.selectedDicts.length} 条记录`)
          },
          handleAdd() {
            this.dialogTitle = '新增字典'
            this.dictForm = {
              dictTypeCode: '',
              dictTypeName: '',
              dictItemCode: '',
              dictItemName: '',
              sortOrder: 1,
              status: '启用',
            }
            this.dialogVisible = true
          },
          handleEdit(row) {
            this.dialogTitle = '编辑字典'
            this.dictForm = { ...row }
            this.dialogVisible = true
          },
          handleDelete(row) {
            this.$confirm('确定要删除这条记录吗？', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message.success('删除成功')
              })
              .catch(() => {
                this.$message.info('已取消删除')
              })
          },
          handleSubmit() {
            this.$refs.dictForm.validate((valid) => {
              if (valid) {
                this.$message.success('保存成功')
                this.dialogVisible = false
              } else {
                this.$message.error('请检查输入信息')
              }
            })
          },
          handleSizeChange(val) {
            this.pageSize = val
          },
          handleCurrentChange(val) {
            this.pageNum = val
          },

          // 数据校验规则管理相关方法
          handleRuleSearch() {
            this.ruleLoading = true
            setTimeout(() => {
              this.ruleLoading = false
              this.$message.success('查询完成')
            }, 1000)
          },
          handleRuleReset() {
            this.ruleSearchForm = {
              ruleCode: '',
              ruleName: '',
              validationType: '',
            }
          },
          handleRuleSelectionChange(selection) {
            this.selectedRules = selection
          },
          batchEnableRules() {
            if (this.selectedRules.length === 0) {
              this.$message.warning('请选择要启用的记录')
              return
            }
            this.$message.success(`已启用 ${this.selectedRules.length} 条记录`)
          },
          batchDisableRules() {
            if (this.selectedRules.length === 0) {
              this.$message.warning('请选择要停用的记录')
              return
            }
            this.$message.success(`已停用 ${this.selectedRules.length} 条记录`)
          },
          handleAddRule() {
            this.ruleDialogTitle = '新增规则'
            this.ruleForm = {
              ruleCode: '',
              ruleName: '',
              validationType: '',
              expression: '',
              beanId: '',
              remark: '',
              status: '启用',
              sequence: 1,
            }
            this.ruleDialogVisible = true
          },
          handleEditRule(row) {
            this.ruleDialogTitle = '编辑规则'
            this.ruleForm = { ...row }
            this.ruleDialogVisible = true
          },
          handleTestRule(row) {
            this.currentTestRule = { ...row }
            this.testRuleDialogTitle = `测试校验规则 - ${row.ruleName}`
            this.testRuleForm = {
              testValue: '',
              testResult: '',
              testMessage: '',
              isValid: null,
              testing: false,
            }
            this.testRuleDialogVisible = true
          },
          handleDeleteRule(row) {
            this.$confirm('确定要删除这条规则吗？', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message.success('删除成功')
              })
              .catch(() => {
                this.$message.info('已取消删除')
              })
          },
          getValidationTypeTag(type) {
            const tags = {
              regex: 'primary',
              custom: 'success',
              range: 'warning',
            }
            return tags[type] || 'info'
          },
          getValidationTypeText(type) {
            const texts = {
              regex: '正则表达式',
              custom: '自定义方法',
              range: '数值范围',
            }
            return texts[type] || type
          },
          handleRuleSizeChange(val) {
            this.rulePageSize = val
          },
          handleRuleCurrentChange(val) {
            this.rulePageNum = val
          },

          // 填报模板管理相关方法
          handleTemplateSearch() {
            this.templateLoading = true
            setTimeout(() => {
              this.templateLoading = false
              this.$message.success('查询完成')
            }, 1000)
          },
          handleTemplateReset() {
            this.templateSearchForm = {
              reportName: '',
              tableNameEn: '',
              businessLine: '',
              cycle: '',
            }
          },
          handleTemplateSelectionChange(selection) {
            this.selectedTemplates = selection
          },
          batchEnableTemplates() {
            if (this.selectedTemplates.length === 0) {
              this.$message.warning('请选择要启用的记录')
              return
            }
            this.$message.success(`已启用 ${this.selectedTemplates.length} 条记录`)
          },
          batchDisableTemplates() {
            if (this.selectedTemplates.length === 0) {
              this.$message.warning('请选择要停用的记录')
              return
            }
            this.$message.success(`已停用 ${this.selectedTemplates.length} 条记录`)
          },
          handleAddTemplate() {
            this.templateDialogTitle = '新增模板'
            this.templateForm = {
              reportName: '',
              tableNameEn: '',
              tableNameCn: '',
              businessLine: '',
              cycle: '',
              hasTarget: true,
              fillingLevel: '',
              purpose: '',
              status: '启用',
            }
            this.templateDialogVisible = true
          },
          handleEditTemplate(row) {
            this.templateDialogTitle = '编辑模板'
            this.templateForm = { ...row }
            this.templateDialogVisible = true
          },
          handlePreviewTemplate(row) {
            this.templatePreviewDialogVisible = true
            this.$message.success(`正在预览模板：${row.reportName}`)
          },
          handleConfigTemplate(row) {
            this.templateConfigDialogTitle = `配置模板：${row.reportName}`
            this.templateConfigDialogVisible = true
          },
          handleTemplateSizeChange(val) {
            this.templatePageSize = val
          },
          handleTemplateCurrentChange(val) {
            this.templatePageNum = val
          },
          // 字段配置相关方法
          addFieldConfig() {
            this.$message.info('新增字段功能')
          },
          addChildField(parentNode) {
            // 生成新的ID
            const newId = Date.now()
            const newLevel = parentNode.level + 1

            // 创建新的子字段
            const newField = {
              id: newId,
              level: newLevel,
              templateHeader: `新字段${newId}`,
              unit: '',
              weeklyTarget: '',
              weeklyAccumulated: '',
              weeklyCompletionRate: '',
              cumulativeTarget: '',
              cumulativePremium: '',
              cumulativeCompletionRate: '',
              cumulativeRanking: '',
              wholeLifePremium: '',
              wholeLifeCompletionRate: '',
              healthPremium: '',
              healthCompletionRate: '',
              fieldNameEn: '',
              fieldRemark: '',
              fieldType: '',
              length: '',
              validationRules: [],
              validationRuleNames: [],
              customRegex: '',
              dataDictionary: '',
              remark: '',
            }

            // 如果是第四级，添加字段英文名
            if (newLevel === 4) {
              newField.fieldNameEn = `new_field_${newId}`
              newField.fieldRemark = '新增字段'
              newField.fieldType = 'numeric'
              newField.length = '10'
              newField.validationRules = ['NON_NULL']
              newField.validationRuleNames = ['非空']
            }

            // 添加到父节点的children中
            if (!parentNode.children) {
              this.$set(parentNode, 'children', [])
            }
            parentNode.children.push(newField)

            // 自动展开父节点
            if (!this.expandedKeys.includes(parentNode.id)) {
              this.expandedKeys.push(parentNode.id)
            }

            this.$message.success(`已在"${parentNode.templateHeader}"下新增子字段`)
          },
          renameField(node) {
            this.$prompt('请输入新的字段名称', '重命名字段', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              inputValue: node.templateHeader,
              inputValidator: (value) => {
                if (!value || value.trim() === '') {
                  return '字段名称不能为空'
                }
                return true
              },
            })
              .then(({ value }) => {
                node.templateHeader = value.trim()
                this.$message.success('重命名成功')
              })
              .catch(() => {
                this.$message.info('已取消重命名')
              })
          },
          importFieldConfig() {
            this.$message.info('导入字段功能')
          },
          exportFieldConfig() {
            this.$message.info('导出字段功能')
          },
          editFieldConfig(row) {
            this.$message.info(`编辑字段：${row.templateHeader}`)
          },
          deleteFieldConfig(row) {
            this.$confirm('确定要删除这个字段吗？', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message.success('删除成功')
              })
              .catch(() => {
                this.$message.info('已取消删除')
              })
          },
          saveFieldConfig() {
            this.$message.success('字段配置保存成功')
            this.templateConfigDialogVisible = false
          },
          expandAllNodes() {
            // 获取所有有子节点的节点ID
            const getAllNodeIds = (nodes) => {
              let ids = []
              nodes.forEach((node) => {
                if (node.children && node.children.length > 0) {
                  ids.push(node.id)
                  ids = ids.concat(getAllNodeIds(node.children))
                }
              })
              return ids
            }
            this.expandedKeys = getAllNodeIds(this.fieldConfigTreeData)
            this.$message.success('已展开所有节点')
          },
          collapseAllNodes() {
            this.expandedKeys = []
            this.$message.success('已收起所有节点')
          },

          // 数据填报相关方法
          refreshDataFilling() {
            this.$message.success('数据已刷新')
          },
          searchDataFilling() {
            this.$message.info('查询数据填报任务')
          },
          resetDataFillingSearch() {
            this.dataFillingSearchForm = {
              taskName: '',
              dataDateRange: '',
              cycle: '',
            }
            this.$message.info('搜索条件已重置')
          },
          handlePendingTaskSelectionChange(selection) {
            this.selectedPendingTasks = selection
          },
          handleCompletedTaskSelectionChange(selection) {
            this.selectedCompletedTasks = selection
          },

          // 表格合并单元格方法
          spanMethod({ row, column, rowIndex, columnIndex }) {
            // 对项目类别列进行合并
            if (columnIndex === 0) {
              const category = row.category
              let rowspan = 1

              // 计算当前分类的行数
              for (let i = rowIndex + 1; i < this.casePreventionData.length; i++) {
                if (this.casePreventionData[i].category === category) {
                  rowspan++
                } else {
                  break
                }
              }

              // 如果是该分类的第一行，返回合并的行数
              if (rowIndex === 0 || this.casePreventionData[rowIndex - 1].category !== category) {
                return [rowspan, 1]
              } else {
                return [0, 0]
              }
            }

            // 对填报责任部门列进行合并
            if (columnIndex === 6) {
              const category = row.category
              let rowspan = 1

              // 计算当前分类的行数
              for (let i = rowIndex + 1; i < this.casePreventionData.length; i++) {
                if (this.casePreventionData[i].category === category) {
                  rowspan++
                } else {
                  break
                }
              }

              // 如果是该分类的第一行，返回合并的行数
              if (rowIndex === 0 || this.casePreventionData[rowIndex - 1].category !== category) {
                return [rowspan, 1]
              } else {
                return [0, 0]
              }
            }

            // 对填报口径说明列进行合并
            if (columnIndex === 7) {
              const category = row.category
              let rowspan = 1

              // 计算当前分类的行数
              for (let i = rowIndex + 1; i < this.casePreventionData.length; i++) {
                if (this.casePreventionData[i].category === category) {
                  rowspan++
                } else {
                  break
                }
              }

              // 如果是该分类的第一行，返回合并的行数
              if (rowIndex === 0 || this.casePreventionData[rowIndex - 1].category !== category) {
                return [rowspan, 1]
              } else {
                return [0, 0]
              }
            }
          },

          // 直接填报页页相关方法
          saveFillingDetail() {
            this.$message.success('数据已保存到草稿')
          },
          submitFillingDetail() {
            this.$confirm('确认提交填报数据？提交后将无法修改。', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message.success('数据提交成功')
                // 这里可以添加提交后的逻辑，比如跳转回数据填报页面
              })
              .catch(() => {
                this.$message.info('已取消提交')
              })
          },
          goBackToDataFilling() {
            // 滚动到数据填报页面
            const element = document.getElementById('data-filling')
            if (element) {
              element.scrollIntoView({
                behavior: 'smooth',
                block: 'start',
              })
            }
          },
          handleDataChange(row) {
            // 数据变更时的处理逻辑
            console.log('数据变更:', row)
            // 可以在这里添加数据验证逻辑
            if (row.duplicates !== null && row.duplicates > row.newAdditions) {
              this.$message.warning('重复数不能大于新增数')
              row.duplicates = row.newAdditions
            }
          },

          // 计算合并单元格的方法
          calculateSpanArr(data, propName, isInlineEdit) {
            const spanArr = []
            let currentValue = null
            let count = 0

            for (let i = 0; i < data.length; i++) {
              if (i === 0) {
                currentValue = data[i][propName]
                count = 1
              } else {
                if (data[i][propName] === currentValue) {
                  count++
                } else {
                  // 处理前一组相同值
                  for (let j = i - count; j < i; j++) {
                    if (j === i - count) {
                      spanArr[j] = count
                    } else {
                      spanArr[j] = 0
                    }
                  }
                  // 开始新的一组
                  currentValue = data[i][propName]
                  count = 1
                }
              }
            }

            // 处理最后一组
            for (let j = data.length - count; j < data.length; j++) {
              if (j === data.length - count) {
                spanArr[j] = count
              } else {
                spanArr[j] = 0
              }
            }

            if (isInlineEdit) {
              this.spanArrInline = spanArr
            } else {
              this.spanArr = spanArr
            }
          },

          // 填报详情页表格的合并配置
          fillingDetailSpanMethod({ row, column, rowIndex, columnIndex }) {
            // if (columnIndex === 0) {
            //   // 项目类别列 - 根据category字段进行合并
            //   const _row = this.spanArr[rowIndex]
            //   const _col = _row > 0 ? 1 : 0
            //   return {
            //     rowspan: _row,
            //     colspan: _col,
            //   }
            // }
            return {
              rowspan: 1,
              colspan: 1,
            }
          },

          // 表内编辑表格的合并配置
          inlineEditSpanMethod({ row, column, rowIndex, columnIndex }) {
            if (columnIndex === 0) {
              // 项目类别列
              const _row = this.spanArrInline[rowIndex]
              const _col = _row > 0 ? 1 : 0
              return {
                rowspan: _row,
                colspan: _col,
              }
            }
            return {
              rowspan: 1,
              colspan: 1,
            }
          },

          // 表内编辑相关方法
          openInlineEdit(row) {
            // 复制案防情况统计表数据到表内编辑数据
            this.inlineEditData = JSON.parse(JSON.stringify(this.casePreventionData))
            // 计算表内编辑表格的合并配置
            this.calculateSpanArr(this.inlineEditData, 'category', true)
            this.inlineEditDialogVisible = true
          },

          // 数据上传相关方法
          openDataUpload(row) {
            this.uploadData.reportType = row.reportName
            this.fileList = []
            this.dataUploadDialogVisible = true
          },
          downloadExcelTemplate() {
            // 下载Excel模板
            const link = document.createElement('a')
            link.href = '/templates/银行业金融机构案防情况统计表模板.xlsx'
            link.download = '银行业金融机构案防情况统计表模板.xlsx'
            document.body.appendChild(link)
            link.click()
            document.body.removeChild(link)
            this.$message.success('模板下载成功')
          },
          beforeUpload(file) {
            const isExcel =
              file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ||
              file.type === 'application/vnd.ms-excel'
            const isLt10M = file.size / 1024 / 1024 < 10

            if (!isExcel) {
              this.$message.error('只能上传Excel文件!')
              return false
            }
            if (!isLt10M) {
              this.$message.error('文件大小不能超过10MB!')
              return false
            }
            return true
          },
          handleUploadSuccess(response, file, fileList) {
            this.uploadLoading = false
            this.$message.success('文件上传成功')
            this.dataUploadDialogVisible = false
            // 刷新数据列表
            this.loadData()
          },
          handleUploadError(err, file, fileList) {
            this.uploadLoading = false
            this.$message.error('文件上传失败: ' + err.message)
          },
          handleRemove(file, fileList) {
            this.fileList = fileList
          },
          submitUpload() {
            if (this.fileList.length === 0) {
              this.$message.warning('请先选择要上传的文件')
              return
            }
            this.uploadLoading = true
            this.$refs.upload.submit()
          },
          openFillingDetail(row) {
            // 滚动到直接填报页页面
            const element = document.getElementById('filling-detail')
            if (element) {
              element.scrollIntoView({
                behavior: 'smooth',
                block: 'start',
              })
            }
          },
          handleCellDoubleClick(row, column, cell, event) {
            // 双击单元格处理
            if (column.property === 'newAdditions') {
              this.startEdit(row, 'newAdditions')
            } else if (column.property === 'duplicates' && row.allowDuplicate) {
              this.startEdit(row, 'duplicates')
            } else if (column.property === 'cumulativeTotal') {
              this.startEdit(row, 'cumulativeTotal')
            }
          },
          startEdit(row, field) {
            // 开始编辑
            row.editing = true
            row.editingField = field
            this.$nextTick(() => {
              const input = this.$refs.editInput
              if (input && input.length > 0) {
                input[0].focus()
              }
            })
          },
          finishEdit(row, field) {
            // 完成编辑
            row.editing = false
            row.editingField = null
            // 数据验证
            if (field === 'duplicates' && row.duplicates > row.newAdditions) {
              this.$message.warning('重复数不能大于新增数')
              row.duplicates = row.newAdditions
            }
            this.$message.success('数据已更新')
          },
          cancelEdit(row, field) {
            // 取消编辑
            row.editing = false
            row.editingField = null
            this.$message.info('已取消编辑')
          },
          saveInlineEdit() {
            // 保存表内编辑数据
            this.$message.success('表内编辑数据已保存')
            this.inlineEditDialogVisible = false
          },
          submitInlineEdit() {
            // 提交表内编辑数据
            this.$confirm('确认提交表内编辑数据？提交后将无法修改。', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message.success('表内编辑数据提交成功')
                this.inlineEditDialogVisible = false
              })
              .catch(() => {
                this.$message.info('已取消提交')
              })
          },
          downloadTemplate(row) {
            this.$message.info(`下载模板：${row.taskName}`)
          },
          handleUploadData(row) {
            this.$message.info(`上传数据：${row.taskName}`)
          },
          previewDataMethod(row) {
            this.$message.info(`预览数据：${row.taskName}`)
          },
          reuploadData(row) {
            this.$message.info(`重新上传：${row.taskName}`)
          },
          previewFilledData(row) {
            this.$message.info(`预览已填报数据：${row.taskName}`)
          },
          getPendingTaskStatusType(status) {
            const statusMap = {
              待填报: 'warning',
              进行中: 'primary',
              已超期: 'danger',
            }
            return statusMap[status] || 'info'
          },
          getCompletedTaskStatusType(status) {
            const statusMap = {
              已提交: 'success',
              已填报: 'info',
              已退回: 'danger',
            }
            return statusMap[status] || 'info'
          },
          handlePendingTaskSizeChange(val) {
            this.pendingTaskPageSize = val
            this.$message.info(`每页显示${val}条`)
          },
          handlePendingTaskCurrentChange(val) {
            this.pendingTaskPageNum = val
            this.$message.info(`当前页：${val}`)
          },
          handleCompletedTaskSizeChange(val) {
            this.completedTaskPageSize = val
            this.$message.info(`每页显示${val}条`)
          },
          handleCompletedTaskCurrentChange(val) {
            this.completedTaskPageNum = val
            this.$message.info(`当前页：${val}`)
          },

          // 目标管理相关方法
          handleAddTarget() {
            this.targetDialogTitle = '新增目标'
            this.targetForm = {
              targetName: '',
              businessLine: '',
              targetCycle: '',
              targetYear: new Date().getFullYear(),
              targetValue: '',
              unit: '万元',
              description: '',
              status: '启用',
            }
            this.targetDialogVisible = true
          },
          handleEditTarget(row) {
            this.targetDialogTitle = '编辑目标'
            this.targetForm = {
              targetName: row.targetName,
              businessLine: row.businessLine,
              targetCycle: row.targetCycle,
              targetYear: row.targetYear,
              targetTimeRange: row.targetTimeRange || [],
              targetValue: row.targetValue,
              unit: row.unit,
              description: row.description || '',
              fillingTips: row.fillingTips || '',
              fillingTipsImageList: row.fillingTipsImageList || [],
              status: row.status,
            }
            this.targetDialogVisible = true
          },
          handleTargetSubmit() {
            this.$refs.targetForm.validate((valid) => {
              if (valid) {
                this.$message.success('目标保存成功')
                this.targetDialogVisible = false
              } else {
                this.$message.error('请检查表单信息')
                return false
              }
            })
          },
          handlePreview(file) {
            console.log('预览文件:', file)
          },
          handleRemove(file, fileList) {
            this.targetForm.fillingTipsImageList = fileList
          },
          beforeUpload(file) {
            const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'
            const isLt2M = file.size / 1024 / 1024 < 2

            if (!isJPG) {
              this.$message.error('上传图片只能是 JPG/PNG 格式!')
            }
            if (!isLt2M) {
              this.$message.error('上传图片大小不能超过 2MB!')
            }
            return isJPG && isLt2M
          },
          handleTargetAllocation(row) {
            // 滚动到目标值分配页面
            const element = document.getElementById('target-filling')
            if (element) {
              element.scrollIntoView({
                behavior: 'smooth',
                block: 'start',
              })
              this.$message.success(`已跳转到目标值分配页面：${row.targetName}`)
            } else {
              this.$message.error('目标值分配页面不存在')
            }
          },
          handleDeleteTarget(row) {
            this.$confirm('确定要删除这个目标吗？', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message.success('删除成功')
              })
              .catch(() => {
                this.$message.info('已取消删除')
              })
          },
          batchEnableTarget() {
            if (this.selectedTargets.length === 0) {
              this.$message.warning('请先选择要启用的目标')
              return
            }
            this.$message.success(`已启用${this.selectedTargets.length}个目标`)
          },
          batchDisableTarget() {
            if (this.selectedTargets.length === 0) {
              this.$message.warning('请先选择要停用的目标')
              return
            }
            this.$message.success(`已停用${this.selectedTargets.length}个目标`)
          },
          searchTarget() {
            this.$message.info('查询目标')
          },
          resetTargetSearch() {
            this.targetSearchForm = {
              targetName: '',
              businessLine: '',
              targetCycle: '',
              status: '',
            }
            this.$message.info('搜索条件已重置')
          },
          handleTargetSelectionChange(selection) {
            this.selectedTargets = selection
          },
          handleTargetSizeChange(val) {
            this.targetPageSize = val
            this.$message.info(`每页显示${val}条`)
          },
          handleTargetCurrentChange(val) {
            this.targetPageNum = val
            this.$message.info(`当前页：${val}`)
          },

          // 目标填报相关方法
          refreshTargetFilling() {
            this.$message.success('数据已刷新')
          },
          searchTargetFilling() {
            this.$message.info('查询目标值分配')
          },
          resetTargetFillingSearch() {
            this.targetFillingSearchForm = {
              targetName: '',
              businessLine: '',
              fillingCycle: '',
              status: '',
            }
            this.$message.info('搜索条件已重置')
          },
          startTargetFilling(row) {
            this.targetFillingDialogTitle = `开始分配：${row.targetName}`
            this.targetFillingDialogVisible = true
          },
          editTargetFilling(row) {
            this.targetFillingDialogTitle = `修改分配：${row.targetName}`
            this.targetFillingDialogVisible = true
          },
          viewTargetFillingDetail(row) {
            this.targetFillingDetailDialogTitle = `查看详情：${row.targetName}`
            this.targetFillingDetailDialogVisible = true
          },
          saveTargetFilling() {
            this.$message.success('目标值分配保存成功')
            this.targetFillingDialogVisible = false
          },
          submitTargetFilling() {
            this.$confirm('确定要提交目标值分配吗？', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message.success('目标值分配提交成功')
                this.targetFillingDialogVisible = false
              })
              .catch(() => {
                this.$message.info('已取消提交')
              })
          },
          getCompletionRateType(rate) {
            if (rate >= 100) return 'success'
            if (rate >= 80) return 'warning'
            return 'danger'
          },
          getTargetFillingStatusType(status) {
            const statusMap = {
              待填报: 'warning',
              已填报: 'success',
            }
            return statusMap[status] || 'info'
          },

          handleTargetFillingSelectionChange(selection) {
            this.selectedTargetFillings = selection
          },
          handleTargetFillingSizeChange(val) {
            this.targetFillingPageSize = val
            this.$message.info(`每页显示${val}条`)
          },
          handleTargetFillingCurrentChange(val) {
            this.targetFillingPageNum = val
            this.$message.info(`当前页：${val}`)
          },

          // 填报情况统计相关方法
          refreshReportCollection() {
            this.$message.success('数据已刷新')
          },
          exportReportCollection() {
            this.$message.info('导出填报情况统计')
          },
          searchReportCollection() {
            this.$message.info('查询填报情况统计')
          },
          resetReportCollectionSearch() {
            this.reportCollectionSearchForm = {
              reportName: '',
              businessLine: '',
              cycle: '',
              dataDateRange: '',
            }
            this.$message.info('搜索条件已重置')
          },
          viewReportDetail(row) {
            this.$message.info(`查看报表详情：${row.reportName}`)
          },
          viewOrgProgress(row) {
            // 滚动到填报明细页面
            const element = document.getElementById('filling-detail-list')
            if (element) {
              element.scrollIntoView({
                behavior: 'smooth',
                block: 'start',
              })
              this.$message.success(`已跳转到填报明细页面：${row.reportName}`)
            } else {
              this.$message.error('填报明细页面不存在')
            }
          },
          getReportCollectionStatusType(status) {
            const statusMap = {
              已完成: 'success',
              进行中: 'primary',
              待填报: 'warning',
              已超期: 'danger',
            }
            return statusMap[status] || 'info'
          },
          handleReportCollectionSelectionChange(selection) {
            this.selectedReportCollections = selection
          },
          handleReportCollectionSizeChange(val) {
            this.reportCollectionPageSize = val
            this.$message.info(`每页显示${val}条`)
          },
          handleReportCollectionCurrentChange(val) {
            this.reportCollectionPageNum = val
            this.$message.info(`当前页：${val}`)
          },

          // 审计日志相关方法
          refreshAuditLog() {
            this.$message.success('数据已刷新')
          },
          exportAuditLog() {
            this.$message.info('导出审计日志')
          },
          searchAuditLog() {
            this.$message.info('查询审计日志')
          },
          resetAuditLogSearch() {
            this.auditLogSearchForm = {
              timeRange: '',
              logType: '',
              operator: '',
              module: '',
              operationType: '',
              isException: '',
              exceptionStack: '',
            }
            this.$message.info('搜索条件已重置')
          },
          viewAuditDetail(row) {
            this.$message.info(`查看审计详情：${row.logType}`)
          },
          getLogTypeTagType(logType) {
            const typeMap = {
              数据上传日志: 'primary',
              数据导出申请日志: 'warning',
              数据导出日志: 'success',
              登录使用日志: 'info',
              系统运行日志: 'default',
            }
            return typeMap[logType] || 'info'
          },
          getOperationTypeTagType(operationType) {
            const typeMap = {
              登录: 'success',
              上传: 'primary',
              下载: 'success',
              新增: 'primary',
              删除: 'danger',
            }
            return typeMap[operationType] || 'info'
          },
          handleAuditLogSelectionChange(selection) {
            this.selectedAuditLogs = selection
          },
          handleAuditLogSizeChange(val) {
            this.auditLogPageSize = val
            this.$message.info(`每页显示${val}条`)
          },
          handleAuditLogCurrentChange(val) {
            this.auditLogPageNum = val
            this.$message.info(`当前页：${val}`)
          },

          // 填报明细相关方法
          refreshFillingDetail() {
            this.$message.success('数据已刷新')
          },
          exportFillingDetail() {
            this.$message.info('导出填报明细')
          },
          searchFillingDetail() {
            this.$message.info('查询填报明细')
          },
          resetFillingDetailSearch() {
            this.fillingDetailSearchForm = {
              taskName: '',
              dataDateRange: '',
              cycle: '',
              fillerOrg: '',
            }
            this.$message.info('搜索条件已重置')
          },
          reuploadDataMarket() {
            this.$message.info('重新上传数据集市')
          },
          previewFillingData(row) {
            // 滚动到直接填报页面
            const element = document.getElementById('filling-detail')
            if (element) {
              element.scrollIntoView({
                behavior: 'smooth',
                block: 'start',
              })
              this.$message.success(`已跳转到直接填报页面：${row.taskName}`)
            } else {
              this.$message.error('直接填报页面不存在')
            }
          },
          getUploadStatusType(status) {
            const statusMap = {
              已上传: 'success',
              待上传: 'warning',
              上传失败: 'danger',
            }
            return statusMap[status] || 'info'
          },
          handleFillingDetailSelectionChange(selection) {
            this.selectedFillingDetails = selection
          },
          handleFillingDetailSizeChange(val) {
            this.fillingDetailPageSize = val
            this.$message.info(`每页显示${val}条`)
          },
          handleFillingDetailCurrentChange(val) {
            this.fillingDetailPageNum = val
            this.$message.info(`当前页：${val}`)
          },
          handleDeleteTemplate(row) {
            this.$confirm('确定要删除这个模板吗？', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message.success('删除成功')
              })
              .catch(() => {
                this.$message.info('已取消删除')
              })
          },
          getBusinessLineTag(line) {
            const tags = {
              corporate: 'primary',
              retail: 'success',
              market: 'warning',
              risk: 'danger',
            }
            return tags[line] || 'info'
          },
          getBusinessLineText(line) {
            const texts = {
              corporate: '公司金融',
              retail: '零售金融',
              market: '金融市场',
              risk: '风险管理',
            }
            return texts[line] || line
          },
          getCycleTag(cycle) {
            const tags = {
              daily: 'primary',
              weekly: 'success',
              monthly: 'warning',
              quarterly: 'info',
              yearly: 'danger',
              irregular: 'warning',
            }
            return tags[cycle] || 'info'
          },
          getCycleText(cycle) {
            const texts = {
              daily: '日',
              weekly: '周',
              monthly: '月',
              quarterly: '季',
              yearly: '年',
              irregular: '不定期',
            }
            return texts[cycle] || cycle
          },

          // 案防统计管理相关方法
          handleCasePreventionSearch() {
            this.casePreventionLoading = true
            // 模拟搜索
            setTimeout(() => {
              this.casePreventionLoading = false
              this.$message.success('查询完成')
            }, 1000)
          },
          handleCasePreventionReset() {
            this.casePreventionSearchForm = {
              typeName: '',
              projectName: '',
            }
            this.$message.info('搜索条件已重置')
          },
          handleCasePreventionSelectionChange(selection) {
            this.selectedCasePreventionItems = selection
          },
          handleCasePreventionSizeChange(val) {
            this.casePreventionPageSize = val
            this.$message.info(`每页显示${val}条`)
          },
          handleCasePreventionCurrentChange(val) {
            this.casePreventionPageNum = val
            this.$message.info(`当前页：${val}`)
          },
          handleAddProjectType() {
            this.casePreventionDialogTitle = '新增项目类型'
            this.casePreventionForm = {
              type: 'projectType',
              parentId: '',
              name: '',
              code: '',
              description: '',
              fillingLine: '',
              unit: '',
              reportingScope: '',
              status: '启用',
            }
            this.casePreventionDialogVisible = true
          },
          handleAddProject(row) {
            this.casePreventionDialogTitle = '新增项目'
            this.casePreventionForm = {
              type: 'project',
              parentId: row.id,
              name: '',
              code: '',
              description: '',
              fillingLine: '',
              unit: '',
              reportingScope: '',
              status: '启用',
            }
            this.casePreventionDialogVisible = true
          },
          handleEditCasePrevention(row) {
            this.casePreventionDialogTitle =
              row.type === 'projectType' ? '编辑项目类型' : '编辑项目'
            this.casePreventionForm = { ...row }
            this.casePreventionDialogVisible = true
          },
          handleDeleteCasePrevention(row) {
            const typeText = row.type === 'projectType' ? '项目类型' : '项目'
            this.$confirm(`确定要删除这个${typeText}吗？`, '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message.success('删除成功')
              })
              .catch(() => {
                this.$message.info('已取消删除')
              })
          },
          handleCasePreventionSubmit() {
            this.$refs.casePreventionForm.validate((valid) => {
              if (valid) {
                this.$message.success('保存成功')
                this.casePreventionDialogVisible = false
              } else {
                this.$message.error('请检查表单填写')
              }
            })
          },
          handleTypeChange() {
            // 类型变化时的处理
            if (this.casePreventionForm.type === 'projectType') {
              this.casePreventionForm.parentId = ''
            }
          },

          // 版本管理相关方法
          handleVersionSelect(versionId) {
            this.currentVersion = versionId
            const version = this.versionList.find((v) => v.id === versionId)
            if (version) {
              this.currentVersionInfo = {
                id: version.id,
                name: version.name,
                status: version.status,
              }
              this.$message.success(`已切换到版本：${version.name}`)
              // 这里可以加载该版本的项目数据
              this.loadVersionProjects(versionId)
            }
          },
          handleCreateNewVersion() {
            this.newVersionForm = {
              name: '',
              createType: 'blank',
              sourceVersionId: '',
              description: '',
            }
            this.newVersionDialogVisible = true
          },
          handleCreateTypeChange() {
            // 创建方式变化时清空源版本选择
            if (this.newVersionForm.createType === 'blank') {
              this.newVersionForm.sourceVersionId = ''
            }
          },
          handleNewVersionSubmit() {
            this.$refs.newVersionForm.validate((valid) => {
              if (valid) {
                const newVersion = {
                  id: this.versionList.length + 1,
                  name: this.newVersionForm.name,
                  quarter: this.getQuarterFromName(this.newVersionForm.name),
                  status: '草稿',
                  createTime: this.getCurrentDate(),
                  projectCount:
                    this.newVersionForm.createType === 'copy'
                      ? this.getSourceVersionProjectCount(this.newVersionForm.sourceVersionId)
                      : 0,
                  description: this.newVersionForm.description,
                }
                this.versionList.unshift(newVersion)
                this.currentVersion = newVersion.id
                this.currentVersionInfo = {
                  id: newVersion.id,
                  name: newVersion.name,
                  status: newVersion.status,
                }
                this.newVersionDialogVisible = false
                this.$message.success('版本创建成功')

                // 如果是复制版本，加载源版本的项目数据
                if (this.newVersionForm.createType === 'copy') {
                  this.loadVersionProjects(this.newVersionForm.sourceVersionId)
                }
              } else {
                this.$message.error('请检查表单填写')
              }
            })
          },
          handleImportFromTemplate() {
            this.$message.info('从模板导入功能')
          },
          handleExportVersion() {
            this.$message.info('导出版本功能')
          },
          getVersionStatusType(status) {
            const statusMap = {
              草稿: 'info',
              进行中: 'primary',
              已完成: 'success',
              已归档: 'warning',
            }
            return statusMap[status] || 'info'
          },
          loadVersionProjects(versionId) {
            // 模拟加载版本项目数据
            this.casePreventionLoading = true
            setTimeout(() => {
              this.casePreventionLoading = false
              this.$message.success('项目数据加载完成')
            }, 1000)
          },
          getQuarterFromName(name) {
            // 从版本名称中提取季度信息
            const match = name.match(/(\d{4})年Q(\d)/)
            if (match) {
              return `${match[1]}年Q${match[2]}`
            }
            return '未知季度'
          },
          getCurrentDate() {
            const now = new Date()
            return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(
              now.getDate()
            ).padStart(2, '0')}`
          },
          getSourceVersionProjectCount(versionId) {
            const version = this.versionList.find((v) => v.id === versionId)
            return version ? version.projectCount : 0
          },
        },
      })
    </script>
  </body>
</html>
